/
IFS Enterprise Upstream Framework

IFS Enterprise Upstream Framework

Search the IFS Workflow Wiki
 

Back to IFS Enterprise Upstream Workflows     Back to IFS Enterprise Upstream Event Management

   

IFS Enterprise Upstream offers a framework for creating IFS Workflow cases that can be automated by triggers and public web services. This framework can be leveraged and used for custom workflows as well.



Web Services Configuration

Configure the workflow.properties File

Before starting this process, make sure you know the following values for each workflow or open IFS Workflow to locate the information:

UserUid
TaskUid
ProcessUid

The properties are used to establish the correct instance of IFS Workflow the services will be using including server, uri, and login information. In addition to the general and ProcessMaker specific properties, each individual workflow needs to be maintained in this file. The file is seeded with product-specific workflow information that will need to be maintained in addition to any custom workflows created. The prefixes need to match the codes that are set up in Enterprise Upstream. For example: PRDISP

To configure the workflow.properties file:

  1. On the Tomcat server, open the directory where you unpacked the EU.war file. For example: $ /EU/WEB-INF/classes.

  2. To edit the file workflow.properties file, open it in a text editor.

  3.  Add the code in Table 1 for each workflow you are using, replacing the text in red with values from your environment.

  4. Save your changes and close the file.

  5. Restart the Tomcat server.

Table 1. Workflow Properties Code

Code

Comments

Code

Comments

workflowServer=<servername>
coreUri=<path>
sslEnabled=N

coreUri Example: /api/1.0/workflow/cases

ProcessMaker.grant_type=<password>
ProcessMaker.scope= *
ProcessMaker.client_id=<id>
ProcessMaker.client_secret=<secret>
ProcessMaker.username=<username>
ProcessMaker.password=<password>
ProcessMaker.uri=http://<servername>/workflow/oauth2/token

ProcessMaker.client_id eample: DJKRYAHLZIXIYYSYATPKDKTDCNALYQZB

ProcessMaker.client_secret example: 99019701759b9a651c84b84048380679

<PREFIX>.userUid=<userUid>
<PREFIX>.taskUid=<taskUid>
<PREFIX>.processUid=<processUid>

PRDISP.userUid example: 8134304405a1c9ede215434068599048

RDISP.taskUid example: 634616756590760ebc845c4020844402

PRDISP.processUid example: 136403810590760eba2bb70083713390



Additional Trigger Creation

Understanding Custom Workflows

The IFS Enterprise Upstream framework is delivered with IFS product-specific workflows, but can be leveraged for custom workflows as well. A new package has been created to facilitate the insertion of data in the proper format to the staging table.

The product-specific triggers can be used as a template to create new triggers for inserting data into the staging table for custom workflows. The process to do this includes:

  1. Adding the workflow data to the staging tables.

  2. Updating the workflow.properties file with the userUid, taskUid, and processUid of the desired workflow.

In the trigger the parameter being passed to the EB_WORKFLOW_STG_PKG.insert_row needs to match the prefixes in the workflow.properties file mentioned above. In the following example this would be ‘PRDISP’. The Keys and Values being passed to the procedure will match any additional values that need to be passed to the workflow.



Example Trigger

DECLARE

  --declaring a variable of the wf_variable_TabTyp. wf_variable_TabTyp is a P/L Sql Table.

  x_wf_varibles_tab EB_WORKFLOW_STG_PKG . wf_variable_TabTyp ;

BEGIN

  --Key and value are the attribtes of wf_variable_TabTyp. The data type of these two attributes is varchar2.

  --The length of Key is 30 and Value is 60. EB_WORKFLOW_PKG.insert_row converts these key and value as JSON format.

  --wf_variable_TabTyp can contain many keys and values. It should contain atleast one key and value.

  --If the value is Number and Date data type, then convert number and date data type values to varchar2 and assign these to value attribute.

  --Example

   --x_wf_varibles_tab(1).key:='CODE_TYPE';

   --x_wf_varibles_tab(1).value:=:new.CODE_TYPE;

   --x_wf_varibles_tab(2).key:='LAST_UPDATE_DATE';

   --x_wf_varibles_tab(2).value:=to_char(:new.LAST_UPDATE_DATE, 'DD-MON-YYYY HH:MI:SS');

   --x_wf_varibles_tab(3).key:='LAST_UPDATED_BY';

   --x_wf_varibles_tab(3).value:=to_char(:new.LAST_UPDATED_BY);

 

  IF inserting AND :new. CODE_TYPE in ( 'PRODUCT' , 'DISP_TY' ) THEN

    x_wf_varibles_tab ( 1 ).key:= 'codeType' ;

    x_wf_varibles_tab ( 1 ).value:=:new. CODE_TYPE ;

    x_wf_varibles_tab ( 2 ).key:= 'codeValue ' ;

    x_wf_varibles_tab ( 2 ).value:=:new. CODE ;

 

    EB_WORKFLOW_STG_PKG . insert_row (

        'PRDISP'

       ,:new. last_updated_by

       , x_wf_varibles_tab );

  END IF;

  EXCEPTION

    WHEN OTHERS THEN

     null;

END;






Copyright© 2024 IFS AB. Copying prohibited. All rights reserved.