Following are two approach's to use ErrorOperationCount in a process flow.
1. Approach using Expression Condition.
You can use the ErrorOperationCount variable to check for any errors resulting from a particular activity.
If you also want to use the errors as a stream in the process flow then follow the steps:
- Make the activity Error Level of the activity that is generating the errors to "Process"
- Make the generate stream to "True"
- Use the multiple stream option on the activity, enter the stream name as "error" and then map the stream to the consumer activity
- check the Error Stream check-box and click Done
Now in the decision node after the activity you can use the Expression Condition to apply a rule on the variable such as $$Service..ErrorOperationCount$$ !=
Note that the variable is of type string.
You can use OperationCount variable to identify the number of records that are processed successfully. You can use the above approach of emailing the count of processed records as part of an email notification. In your process flow, use the putcontextVar and select the notification email and then select the mailSubject as the variable and in the value field put $$OperationCount$$. You can put a string like >> Process Flow executed with $$OperationCount$$
Please refer to the image below.
2. Approach using a Java condition.
You can also use the following Java Condition to filter the stream when error record is generated. Attached are the screenshots and a txt document containing the Java Condition.
Comments
0 comments
Article is closed for comments.