Problems with Request Workflows
This section describes problems related to request workflows.
Request Workflow Uses the Wrong Initiator
Indication:
The workflow initiator is not set correctly when you have implemented your own "ApplyChanges" job class and another request workflow is started by that job class.
Reason:
You have not set the workflow initiator explicitly in your job class.
Solution:
You must provide the workflow initiator in the SvcSession object. You need to integrate the following snippet into your job class (see the sample Job "SampleJobStartNewRequestWorkflow", too):
protected void run(TaskContext taskCtx,
Map modifications,
SvcSession session,
Order subject,
Order[] resources,
Map parameters) throws Exception {
...
Order request = (resources != null && resources.length != 0)
? resources[0] : subject;
if (request != null) {
// read creator from order and set initiator for new
// request workflow (that is
// initiated e.g. when processing
// "SvcUsser.chackAndSave()" and attribute policies are
// active).
session.setInitiator(request.getCreator());
}
...
}