Setting up Success Codes

Each task in each component has a Success Code field where you can specify a code that means the task completed successfully.

You can customize this:

Example

  1. From Foresight Studio, open the Model system and choose Component Templates > ResponseGen.xml > Task tab.

    This defines the behavior of the ResponseGen component.

  1. The task list contains these tasks plus the ComponentEnd marker.

    Currently, the ResponseGen task is selected and the rest of the screen shows information about it.

    Since RespGen.exe sends 100 if it is able to complete its assignment, the Success Code field should also contain 100.

  1. Choose the DeleteDTLFiles task.

    This contains a workflow global variable. If the task succeeds, it sends a code of 0; therefore, its Success Code field should contain 0.

    To see what the parameter means, choose File > Edit Globals. We can see that it is executing a DOS del command to delete the DTL file from the Component’s Process directory: