Step 1: Create process map to handle import events

Use the following steps to create a process map that can be embedded to your main process map to identify whether the document is imported successfully and handle any unsuccessful document import.

  1. Navigate to Workflow > Business processes and click New.
  2. Specify a Name for the process map such as Handle Import Events.
  3. On the Category list, select Default Category.
  4. Create a process variable, "ErrorMessage" of type String. See Create process variables.
  5. Create the following three process events: IMPORTRUN, IMPORTDUPLICATE and CHECKEVENT. See Create a process event.
  6. Add the following three process flows for the process map:
    1. Create flow for successful import event
    2. Create flow for duplicate document import event
    3. Create flow for timeout

Create flow for successful import event

Use the following steps to create a flow that signifies that the documents are successfully imported.

  1. Select the Start node and on the satellite, click the Activity icon .

    An activity node is added.

  2. Select the activity node and enter a Name as Successful Import.
  3. On the Type list, select Synchronization.
  4. In the Activity properties panel, click the Dependents tab.
  5. Right-click in the rule editor and select Process events.
  6. In the events list, select IMPORTRUN.
  7. In the rule editor, set the condition as IMPORTRUN > 0.
  8. Select the Successful Import node and on the satellite, click the End icon.

The process map may look similar to the following.


successful event

Create flow for duplicate document import event

Use the following steps to create a flow that triggers an event to make sure that duplicate documents are not imported.

  1. In the Handle Import Events map, select the Start node and on the satellite, click the Activity icon .

    An activity node is added.

  2. Select the activity node and enter Name as Duplicate Import.
  3. On the Type list, select Synchronization.
  4. In the Activity properties panel, click the Dependents tab.
  5. Right-click in the rule editor and select Process events.
  6. In the events list, select IMPORTDUPLICATE.
  7. Select the Duplicate Import node and on the satellite, click the Activity icon .

    An activity node is added.

  8. Select the activity node and enter Name as Set Error Message.
  9. On the Type list, select .Net.
  10. Click Configure.

    The Configure .Net activity dialog box is displayed.

  11. On the Assembly file path list, select TotalAgility.Sdk.Dll.
  12. On the Class list, select TotalAgility.Sdk.JobService.
  13. On the Method list, select UpdateJobVariables.
  14. In sessionId, click Server variables and select SPP_SYSTEM_SESSION_ID.
  15. Click for UpdatedVariable.
  16. Select the Id list, click Server variables and select ErrorMessage.
  17. In VariableType, enter 8.
  18. In Value, enter a custom error message as, Terminated due to import duplicate error and click OK.
  19. Select the Set Error Message node and on satellite, click the Activity icon .

    An activity node is added.

  20. Select the activity node and enter Name as Terminate Job.
  21. On the Type list, select .Net.
  22. Click Configure.

    The Configure .Net activity screen is displayed.

  23. In Assembly file path, select TotalAgility.Sdk.Dll.
  24. In Class, select TotalAgility.Sdk.JobService.
  25. In Method, select UpdateJobVariables.
  26. In sessionId, click Server variables and select SPP_SYSTEM_SESSION_ID.
  27. Select OK.
  28. Select the Terminate Job node and on the satellite, click the End icon Satellite - End node icon.

The process map may look similar to the following.


duplicate import event

Create flow for timeout

Use the following steps to create a flow so that if no event (IMPORTRUN or IMPORTDUPLICATE) is triggered for a configured timeout, the process moves to the next node in the map.

  1. In the Handle Import Events map, select the Start node and on the satellite, click the Activity icon .

    An activity node is added.

  2. Select the activity node and enter Name as Timeout.
  3. On the Type list, select Synchronization.
  4. In the Activity properties panel, click the Time and cost tab.
  5. In Triggers, click  for Process.
  6. In Target duration, select After and set the value of Minutes to 30.
  7. On the Process list, select Raise Event For Duplicate Import. See Create map for raising event.
  8. Click OK.
  9. In the Activity properties panel, click the Dependents tab.
  10. Right-click in the rule editor and select Process events.
  11. In the events list, select CHECKEVENT.
  12. In the rule editor, set the condition as CHECKEVENT > 0.
  13. Select the Timeout node and on the satellite, click the End icon Satellite - End node icon.

The final process map may look similar to the following.


timeout event