ConvertKeyDataDelimiter

Update Parent WF Process DS

Minor Business Rule

Object Name: B9000090

Parent DLL: CWRKFLOW

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
Convert the delimiter to a bar. This converted string can now be used as part of the key when doing a table lookup on the F98860 table.

1.2Setup Notes and Prerequisites

• The key data in the process instance table is a bar-delimited string. It is impossible to store this 
string in the process Attribute data structure because that data is also stored as a bar-delimited 

string. For this reason, the KeyData must be stored in the Attribute data structure with a different 

delimiter. If your KeyData is made up of a single string value, then you can place it directly into the 

KeyData field in your Attribute data structure without any delimiters and when you call this function 

leave the OldDelimiter parameter blank.


1.3Special Logic


2.Technical Specifications


2.1Parameters:  


Data Item Data Structure DescriptionI/ORequiredNotes
ISTKEYKeyDataI/OYDelimited string

EV01OldDelimiterIstring delimiter

EV01NewDelimiterIassumed a bar ("|") if left blank



Processing:


• If the value of NewDelimiter is blank, then set NewDelimiter = '|' 
• If the OldDelimiter is blank, then place a NewDelimiter character at the beginning and end of 
KeyData.

• If the OldDelimiter is not blank, then For each occurrence of the OldDelimiter in the KeyData, 
replace that character with the NewDelimiter.


^

Data Structure

D9000090E - Convert Key Data Delimiter

Parameter NameData ItemData TypeReq/OptI/O/Both
szKeyDataISTKEYcharREQBOTH

The key data values associated with the workflow process instance.

cOldDelimiterEV01charREQINPUT

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

cNewDelimiterEV01charREQINPUT

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

Related Functions

N9000090 Workflow System Functions

Related Tables

None
DumpAttrDS

DumpAttrDS

Update Parent WF Process DS

Minor Business Rule

Object Name: B9000090

Parent DLL: CWRKFLOW

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
Dump the Attribute Data in the F98860 record to an ASCII text file.

1.2Setup Notes and Prerequisites

• The key data in the process instance table is a bar-delimited string. It is impossible to store this 
string in the process Attribute data structure because that data is also stored as a bar-delimited 

string. For this reason, the KeyData must be stored in the Attribute data structure with a different 

delimiter. If your KeyData is made up of a single string value, then you can place it directly into the 

KeyData field in your Attribute data structure without any delimiters and when you call this function 

leave the OldDelimiter parameter blank.


1.3Special Logic


2.Technical Specifications


2.1Parameters:  

Data Item Data Structure DescriptionI/ORequiredNotes
PROCNAMEProcessNameIY

PROCVERProcessVersionI

PROCISTProcessInstanceI

ISTKEYKeyDataIYDelimited string. Required if Instance is not supplied

EV01szKeyDataDelimiterIstring delimiter

ACTNAMEActivityNameI

EV01AppendI

NOFILEFileNameI




2.2Related Tables 


Table Table Description

F98800Process Master

F98860Process Instance


2.3Related Business Functions

Source NameFunction Name


Processing:



1.Convert the delimiter in the KeyData to a bar.

2.Read the Process Master F98800 to get the name of the Attribute Data structure and the process version.

• If the ProcessVersion parameter is 0 then read the F98800 table using the PROCES_NAME_STATUS key. 
Read the unique record were:

1.Version Status (VERSTS) = "Y"
2.Process Name (PROCNAME)=  ProcessName


• If the ProcessVesion is supplied then read the F98800 table using the primary PROCESS_NAME key. 
Read the unique record were:

1.Process Name (PROCNAME) = ProcessName
2.ProcessVersion (PROCVER)= ProcessVersion


3.Read the Process Instance F98860 to get the Attribute data

• If the ProcessInstance parameter is 0 then retrieve it from the P98860 table using the 
STATUS__PROCESS_NAME. Read the unique record where:

1.Process Name (PROCNAME) = ProcessName
2.Process Version (PROCVER)= ProcessVersion  (or the value of the version retrieve in the previous step)

3.Process Status (PROCSTS) = "01"  (this is for active)

4.Key Data (ISTKEY) = KeyData  (with converted delimter)

• If the ProcessInstance parameter is supplied, then retrieve it from the P98860 table using the 
primary PROCESS_NAME__VERSION___A key. Read the unique record where:

1.Process Name (PROCNAME) = ProcessName
2.Process Version (PROCVER)= ProcessVersion  (or the value of the version retrieve in the previous step)

3.Process Instance (PROCIST) = ProcessInstance


4.Call AllocBuildHDRStrFromDstmplName to create a bar delimted string of field names.

5.Parse the field name string and the Attribute Data String simultaneously and print the field name with it's corresponding value to a file.



^

Data Structure

D9000090G - Dump Attribute Data Structure

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_NUMERICOPTINPUT

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

mnProcessInstancePROCISTMATH_NUMERICOPTINPUT

Indicates the instance of the workflow process.

szKeyDataISTKEYcharREQINPUT

The key data values associated with the workflow process instance.

cKeyDataDelimiterEV01charREQINPUT

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

szActivityNameACTNAMEcharOPTINPUT

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.

cAppendEV01charOPTINPUT

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

szFileName9MOFILEcharOPTNONE

The name of the file, excluding suffix or path, containing a media object.

Related Functions

N9000090 Workflow System Functions

Related Tables

None
UpdateParentWFProcessDS

UpdateParentWFProcessDS

Update Parent WF Process DS

Minor Business Rule

Object Name: B9000090

Parent DLL: CWRKFLOW

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This function will move the data in a child process back to the parent process.

1.2Setup Notes and Prerequisites

• Care must be taken when calling this function because the active process version can be changed 
after the process has started but before this function is called. For this reason, it is recommended that 

the parent process pass to this function the Process Version and Instance.

• The key data in the process instance table is a bar-delimited string. It is impossible to store this 
string in the process Attribute data structure because that data is also stored as a bar-delimited 

string. The key data (istkey) is necessary to locate the unique active instance record. If your 

processes' key data (process data structure) only contains one data item and that data item is a string, then 

pass that data item to the szKeyData parameters and leave the Delimiter parameter blank and the 

function will place a "|" character at the beginning and end. If your key data is not a string type data 

item or contains more that one field, then add an additional item to your Attribute data structure of 

type istkey. Before StartProcess or as the first activity in your workflow process call CreateWFKeyDataString (see specs for this function later in this 

document).


1.3Special Logic

Read the Process Instance (F98860) to for the parent and child processes. Merge the Attributes Data (ISTDATA) fields into a new string variable and 
update the parent process instance record using this merged string. The merge will move fields from the child process to the corresponding fields of the 

parent process but only if the field in the child process contains a value.

 

2.Technical Specifications


2.1Parameters:  


Data Item Data Structure DescriptionI/ORequiredNotes
PROCNAMEParentProcessNameIY

PROCVERParentProcessVersionIY

PROCISTParentProcessInsanceIY

PROCNAMEChildProcessNameIY

PROCVERChildProcessVesionI

PROCISTChildProcessInstanceI

ISTKEYKeyDataIYDelimited string

EV01DelimiterIstring delimiter

EINDErrorIndicatorO0 = success


2.2Related Tables 


Table Table Description

F98860Process Instance


2.3Related Business Functions


Source NameFunction Name

B9000090ConvertKeyDataDelimiter


Processing:


• Call ConvertKeyDataDelimiter to convert the delimiter in the KeyData input parameter to a bar ("|"). 
If the Delimiter is not found in the szKeyData parameter, then simply place a bar at both ends of  

szKeyData. 

• If the ChildProcessVersion parameter is 0 then retrieve it from the F98800 table using the 
PROCES_NAME_STATUS key. Read the unique record were:

1.Version Status (VERSTS) = "Y"

2.Process Name (PROCNAME)=  ChildProcessName

Return 1 in ErrorIndicator if unable to read the record.
• Read the F98860 record for the child process.
• If the ChildProcessInstance parameter is 0 then retrieve it from the F98860 table using the 
STATUS__PROCESS_NAME. Read the unique record where:

1.Process Name (PROCNAME) = ChildProcessName

2.Process Version (PROCVER)= ChildProcessVersion  (or the value of the version retrieve in the  previous step)

3.Process Status (PROCSTS) = "01"  (this is for active)

4.Key Data (ISTKEY) = KeyData  (with converted delimter)

Return 2 in ErrorIndicator if unable to read the record.
• If the ChildProcessInstance is supplied, then read the F98860 record using the primary key 
PROCESS_NAME__VERSION___A.  Return 3 in ErrorIndicator if unable to read the record.

• Read the F98860 table to retrieve the parent process instance record using the primary key 
PROCESS_NAME__VERSION___A. Return 4 in ErrorIndicator if unable to read the record.

• Call the internal function I_ MergeWFProcessDSStructStrings() to merge the Attribute Data (ISTDTA) 
fields from the parent and child process instance records. This merge will create a new string that 

contains all the field from the parent's Attribute Data overwritten with the values from the child's 

Attribute Data. If a field in the child's attribute data is blank it will not overwrite the parent's 

value.

• Use the new merge string to update the parent's F98860 Process Instance record. Return 5 in 
ErrorIndicator if unable to update the record.


Data Structure

D9000090D - Update Parent WF Process DS

Parameter NameData ItemData TypeReq/OptI/O/Both
szParentProcessNamePROCNAMEcharREQINPUT

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

mnParentProcessVersionPROCVERMATH_NUMERICREQINPUT

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

mnParentProcessInstancePROCISTMATH_NUMERICREQINPUT

Indicates the instance of the workflow process.

szChildProcessNamePROCNAMEcharREQINPUT

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

mnChildProcessVersionPROCVERMATH_NUMERICOPTINPUT

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

mnChildProcessInstancePROCISTMATH_NUMERICOPTINPUT

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.

mnErrorIndicatorEINDMATH_NUMERICOPTOUTPUT

This is the error indicator associated with this field.  If this indicator (as passed in the indicator array from the interface program) is on then 
this field is in error and will be highlighted.  A value of "00" (blanks) indicates that there is no error indicator associated with this field. This value 
is determined by the Build Prompts function and should not be changed.

Related Functions

N9000090 Workflow System Functions

Related Tables

None