CreateWFKeyDataString

Workflow System Functions

Minor Business Rule

Object Name: N9000090

Parent DLL: CWRKFLOW

Location: Client/Server

Language: NER

1.Functional Description
This function is designed to be called multiple time, once for each item to be included in the delimited string.


1.1Purpose
Create a delimited string that can be used as the ISTKEY value when retrieving F98860 records.

1.2Setup Notes and Prerequisites



1.3Special Logic



2.Technical Specifications


2.1Parameters:


Data Item Data Structure DescriptionI/ORequiredNotes

ISTKEYKeyDataI/OR

MATH01MathDataI

DL01StringDataI

DATEDataDataI

EV01CharDataI

EV01DelimiterI




Processing:


/* get the first character of the input parameter szKeyData */

VA evt_FirstChar = substr([BF szKeyData],0,1)


If VA evt_FirstChar is not equal to cDelimiter   /* the string contains no delimiters */

    BF szKeyData = concat ([BF cDelimiter], [BF szKeyData]) /* place a delimiter at the start of the string */

   If VA evt_FirstChar is not equal to    /* the input parameter contained an initial value. */

BF szKeyData = concat ([BF szKeyData], [BF cDelimiter]) /* place a delimiter at the end of the string */

End If

End If


/* Depending on which input parameter contains a value concatenate that value to the end of szKeyData */

If BF MathData is not equal to 

BF szKeyData = concat ([BF szKeyData], [BF MathData])

Else

If BF StringData is not equal to 

BF szKeyData = concat ([BF szKeyData], [BF StringData])

Else

If BF CharData is not equal to 

BF szKeyData = concat ([BF szKeyData], [BF CharData])

Else

If BF DataData is not equal to 

BF szKeyData = concat ([BF szKeyData], [BF DateDate])

End If

End If

End If

End If


/* place a delimiter character at the end of the string */

BF szKeyData = concat ([BF szKeyData], [BF cDelimiter]) 


^

Data Structure

D9000090F - Create WF Key Data String

Parameter NameData ItemData TypeReq/OptI/O/Both
szKeyDataISTKEYcharREQBOTH

The key data values associated with the workflow process instance.

mnMathDataMATH01MATH_NUMERICOPTINPUT

- - - Good Performance Low Value. 

szStringDataDL01charOPTINPUT

A user defined name or remark.

cCharDataEV01charOPTINPUT

An option that specifies the type of processing for an event.

jdDateDataDATE01JDEDATEOPTINPUT

Event point for JDE Date.

cDelimiterEV01charREQINPUT

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

None
GetActiveWFProcessInstance

GetActiveWFProcessInstance

Workflow System Functions

Minor Business Rule

Object Name: N9000090

Parent DLL: CWRKFLOW

Location: Client/Server

Language: NER

1.Functional Description


1.1Purpose
This named ER will retrieve the Instance of an active workflow process.

1.2Setup Notes and Prerequisites


1.3Special Logic

• If ProcessVersion is not passed in, call the GetActiveWFProcessVersion function to retrieve it.
• The KeyData is a bar delimited string in the F98860 table. To store this value in the Attribute data 
structure the bar must be converted to another character a # has been suggested. This function must 

convert the # back to a | before doing the table I/O.


2.Technical Specifications


2.1Parameters:


Data Item Data Structure DescriptionI/ORequiredNotes

PROCNAMEProcessNameIY

PROCVERProcessVersionI/OY

PROCISTProcessInstanceOY

ISTKEYKeyDataIY

EV01DelimiterI


2.2Related Tables 


Table Table Description

F98860Process Master


2.3Related Business Functions


Source NameFunction Name

B9000090ConvertKeyDataDelimiter

N9000090GetActiveWFProcessVersion


Processing:



IF FI ProcessVersion = 

GetActiveWFProcessVersion (FI ProcessName, FI ProcessVersion, "Y")

END

VA evt_ProcessStatus = "01"   /* Active */

VA evt_KeyData = BF szKeyData

ConvertKeyDataDelimiter

VAevt_KeyData

BF cKeyDataDelimiter

"|"


/** Use key #3   (PIPROCSTS,PIPROCNAME,PIPROCVER,PIISTKEY) ****/

F98860.Fetch Single

BF ProcessName = TK Process ID

BF ProcessVersion = TK Process Version

BF ProcessInstance <= TK Process Instance/* BF ProcessInstance receives the value from the record */

VA evt_ProcessStatus= TK Process Status

VA evt_KeyDAta = TK Key Data


Data Structure

D9000090A - Get Active WF Process Instance

Parameter NameData ItemData TypeReq/OptI/O/Both
szProcessNamePROCNAMEcharREQINPUT

The unique identifier for a process. If no value is entered, a next number is assigned. Once assigned, the value cannot be changed.

mnProcessVersionPROCVERMATH_NUMERICREQBOTH

A number from 1 to 99999 that identifies a unique version of a workflow process.

mnProcessInstancePROCISTMATH_NUMERICREQOUTPUT

Indicates the instance of the workflow process.

szKeyDataISTKEYcharREQINPUT

The key data values associated with the workflow process instance.

cKeyDataDelimiterEV01charOPTINPUT

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

None
GetActiveWFProcessVersion

GetActiveWFProcessVersion

Workflow System Functions

Minor Business Rule

Object Name: N9000090

Parent DLL: CWRKFLOW

Location: Client/Server

Language: NER

1.Functional Description


1.1Purpose
Retrieve the active version of the specified Workflow process.  If one is not found, return 0.

1.2Setup Notes and Prerequisites



1.3Special Logic



2.Technical Specifications


2.1Parameters:

Data Item Data Structure DescriptionI/ORequiredNotes

PROCNAMEProcessNameIR
PROCVERProcessVersionORreturn 0 or the process version


2.2Related Tables 

Table Table Description
F98800Process Master



2.3Related Business Functions

Source NameFunction Name


Processing:


/** Use key #2   (PMPROCNAME, PMVERSTS) **/

FI ProcessVersion = 0

VA evt_VersionStatus = "Y"

F98800.Fetch Single

FI ProcessName = TK Process ID

FI ProcessVersion <= TK Process Version

FI ProcessStatus = VA evt_VersionStatus

^

Data Structure

D9000090B - Get Active WF Process Version

Parameter NameData ItemData TypeReq/OptI/O/Both
szProcessNamePROCNAMEcharREQINPUT

The unique identifier for a process. If no value is entered, a next number is assigned. Once assigned, the value cannot be changed.

mnProcessVersionPROCVERMATH_NUMERICREQBOTH

A number from 1 to 99999 that identifies a unique version of a workflow process.

szProcessKeyDataStructurePROCKEYcharOPTOUTPUT

A data structure, comprised of one or more data items, that serves as the key data for the workflow process. A process can be keyed by 
the data items from a workflow task. For example, the primary data structure of a credit limit revisions process would be the address book 
number of the customer whose credit limit was changed. To identify this key data to the system, you must create a data structure that contains 
these items and attach it to the process as the primary data structure. 

szProcessDataStructurePROCDATAcharOPTOUTPUT

Tasks within a Workflow process often evaluate or use data that is passed from other tasks. To pass data between tasks, you must create 
a data structure that contains the data items that you want to be evaluated, and then attach that data structure to the process. For example, 
consider a task within the credit limit revisions process. As the process runs, the task uses the old and new credit limit values to determine to 
whom to send the approval messages.

cProcessVersionStatusVERSTScharOPTBOTH

A value that indicates the status of the version of the workflow process. Only one active version can exist of a workflow process. Valid 
values are:  Y Active N Not active E In use

Related Functions

None

Related Tables

None
UpdateParentProcSingle

UpdateParentProcSingle

Workflow System Functions

Minor Business Rule

Object Name: N9000090

Parent DLL: CWRKFLOW

Location: Client/Server

Language: NER

1.Functional Description


1.1Purpose
Pass a value from a sub process back to the parent process.


1.2Setup Notes and Prerequisites
This function calls the workflow system function Update Proc Inst Attr Single. Update Proc Inst Attr Single has a parameter called "Value". This 

parameter can accept a value of any data type. However, this function has 4 parameters one for each of  the 4 possible data types.


1.3Special Logic


2.Technical Specifications


2.1Parameters:


Data Item Data Structure DescriptionI/ORequiredNotes

PROCNAMEProcessNameIYParent Process ID

PROCVERProcessVersionI/OYParent Process Version

PROCISTProcessInstanceOYParent Process Instance

DATIDataItemIYName if Data Item in Parent to update

MATH01MathValueI

D240StringValueI

DATE01DateValueI

EV01SingleCharValueI



Processing:


If BF mnProcessVersion is less than or equal to 

     Or BF mnProcessInstance is less than or equal to 


    Get Active WF Process Instance

           BF szProcessName -> szProcessName

           BF mnProcessVersion <> mnProcessVersion

           BF mnProcessInstance <- mnProcessInstance

           BF szKeyData -> szKeyData

           BF cDelimiter -> cKeyDataDelimiter

 End If


IF BF MathValue is not equal to  

Update Proc Inst Attr Single  /* Map BF MathValue to the Value parameter */

ELSE

IF BF StringValue is not equal to  

Update Proc Inst Attr Single  /* Map BF StringValue to the Value parameter */

ELSE

IF BF DateValue is not equal to  

Update Proc Inst Attr Single  /* Map BF DateValue to the Value parameter */

ELSE

IF BF SingleCharValue is not equal to  

Update Proc Inst Attr Single  /* Map BF SingleCharValue to the Value parameter */

END IF

END IF

END IF

END IF


Data Structure

D9000090C - Update Parent Proc Single

Parameter NameData ItemData TypeReq/OptI/O/Both
szProcessNamePROCNAMEcharREQINPUT

This parameter is hard coded for the time being because of a bug in the "Start Process" system 
function that will not allow us to pass the name of the parent process to this process. Start Process will 

not work correctly if one of the data structure elements is hard coded.

^

mnProcessVersionPROCVERMATH_NUMERICREQINPUT

A number from 1 to 99999 that identifies a unique version of a workflow process.

mnProcessInstancePROCISTMATH_NUMERICREQINPUT

Indicates the instance of the workflow process.

szDataItemDTAIcharREQINPUT

This paramerter contains the Alias name of the data item in the parent workflow processes data 
structure that is to be updated. mnUnpaidSVH is a MATH03 data item. In order to use the "Update Proc Inst 

Attr Single" system function, the data item being updated must be unique within the data structure.

^

mnNumericValueMATH01MATH_NUMERICOPTINPUT

- - - Good Performance Low Value. 

szStringValueD240charOPTINPUT

A free-form 240 character description field. You can use this field to explain either the need for the requisition, or why the requisition was 
refused.

jdDateValueDATE01JDEDATEOPTINPUT

Event point for JDE Date.

cSingeCharValueEV01charOPTINPUT

An option that specifies the type of processing for an event.

szKeyDataISTKEYcharOPTINPUT

The key data values associated with the workflow process instance.

cDelimiterEV01charOPTINPUT

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

None
WriteF98865HaltDate

WriteF98865HaltDate

Workflow System Functions

Minor Business Rule

Object Name: N9000090

Parent DLL: CWRKFLOW

Location: Client/Server

Language: NER

1.Functional Description
Update the expiration date and time of the specified Halt workflow activity. 


1.1Purpose
Provide the ability to change the date and time that a Halt activity will expire. 


1.2Setup Notes and Prerequisites


1.3Special Logic


2.Technical Specifications


2.1Parameters:

Data Item Data Structure DescriptionI/ORequiredNotes

PROCNAMEszProcesNameIY

PROCVERmnProcessVersionIY

PROCISTmnProcessInstanceIY

RESOURCEmnResourceI

ACTNAMEszActivityNameIY

ACTSTSszActivityStatusI

DAEXPjdDateExpiredI

TIEXPmnTimeExpiredI

MATH01mnReturnCodeO



Processing:


BF mnReturnCode = "0"

// Check to make sure the Activity is a Halt Activity. Activit type = 13

F98810.Fetch Single

        BF szProcessName =  TK Process ID

        BF mnProcessVersion =  TK Process Version

        BF szActivityName =  TK Activity

        VA evt_ActivityType_ACTTYPE <- TK Workflow Activity Type


If VA evt_ActivityType_ACTTYPE is equal to "13"


    //If the activity status was not passed, in default to Active.

    If BF szActivityStatus is less than or equal to 

       // 08 = Awaiting Expiration

       // 09 = Expired

       // 01 = Active

       BF szActivityStatus = "01"

    Else

    End If


    //If the TimeExpired is not passed in, default to midnight.

    If BF mnTimeExpired is less than or equal to 

       BF mnTimeExpired = "0"

    Else

    End If

   

    //Update the Activity Instance record with the Expiration Date and time

    F98865.Update

           BF szProcessName =  TK Process ID

           BF mnProcessVersion =  TK Process Version

           BF mnProcessInstance =  TK Process Instance

           BF szActivityName =  TK Activity

           BF mnResource =  TK Resource

           BF szActivityStatus =  TK Activity Status

           BF jdDateExpired9 -> TK Date Expired

           BF mnTimeExpired -> TK Time Expired

    If SV File_IO_Status is not equal to CO SUCCESS

       BF mnReturnCode = "2"

    End If

 Else

    BF mnReturnCode = "1"

 End If



Data Structure

D9000090H - Write F98865 Expiration Date

Parameter NameData ItemData TypeReq/OptI/O/Both
szProcessNamePROCNAMEcharREQINPUT

The unique identifier for a process. If no value is entered, a next number is assigned. Once assigned, the value cannot be changed.

mnProcessVersionPROCVERMATH_NUMERICREQINPUT

A number from 1 to 99999 that identifies a unique version of a workflow process.

mnProcessInstancePROCISTMATH_NUMERICREQINPUT

Indicates the instance of the workflow process.

mnResourceRESOURCEMATH_NUMERICOPTINPUT

A resource that is associated with a workflow task.

szActivityNameACTNAMEcharREQINPUT

The type of task that is used within a workflow process. The task determines what kind of object is executed when the task is started. Types 
of tasks are: Business Function Launches a business function for special logic processing. Interactive Application Starts an 
application. Message Generates a message that is based on system functions within the software. You can attach one of the generic workflow approval forms 
or any other form. You can also attach text substitution messages. You can mark a message task to be monitored for escalation. Escalation 
enables the system to forward, or escalate, unread messages after a certain period of time to the next user within a distribution list. You add 
escalation to a message so that, when the original recipient of the message is not available to respond to the message, the next recipient 
within a distribution list receives the message. Windows Executable Starts an executable program, such as a word processing program or 
spreadsheet. Batch Application Starts a batch process or report. Local Subprocess Starts another process, also referred to as a subprocess, which 
includes its own set of tasks. The subprocess appears in PeopleSoft EnterpriseOne software. Halt Suspends the process and waits for a 
certain period of time before continuing the process. Start Starts the workflow process. This task is first in every workflow process. Remote 
Subprocess Starts an external process. When used in the context of process rules, the following values apply: Transition Condition Determines 
which task executes and what happens when that task executes. Recipient Condition Determines to whom or to which distribution list a workflow 
message is sent.

szActivityStatusACTSTScharOPTINPUT

A code that indicates the current status of a task instance within a workflow process instance. Valid values 
include: 01 Active 02 Inactive 03 Completed

jdDateExpired9DAEXPJDEDATEOPTINPUT

Expiration date for a halted condition.

mnTimeExpiredTIEXPMATH_NUMERICOPTINPUT

Time expired for a halted condition.

mnReturnCodeMATH01MATH_NUMERICOPTOUTPUT

- - - Good Performance Low Value. 

Related Functions

None

Related Tables

None