on 09-12-2011 10:53 PM
Hello,
I have a requirement to advance the Workflow Step to Next Step for a Record whose Original and Checked out Id is known in the Webdynpro Java Application through Java API. Now I want to find the workflow Task for that record and then advance the Workflow task to next step in the Workflow. How can I achieve the same.?
Any help would be highly appreciated.
Thanks.
Consider below things...
1. Who is the owner of workflow? You can work on workflow task only if you login as workflow owner through Java API.
2. Selecting a workflow based on record is not straight forward in Java API.
For this you have to get the list of all the worflows (for a user) and then compare the record id of each workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shailesh,
Thanks for the reply. So how can I get the list of Workflows for the currently logged in Portal user (which should have the workflow task for the currently modified Item Record by that user), compare the recordid of those workflows with the recordid I have from the iview and then set the Action for the Workflow to Next Step.?
Pls help.
Try this - GetActiveWorkflowTasksCommand(UserSessionContext ctx)
http://help.sap.com/javadocs/MDM71/com/sap/mdm/workflow/commands/GetActiveWorkflowTasksCommand.html
Check this for all workflow commands - http://help.sap.com/javadocs/MDM71/com/sap/mdm/workflow/commands/package-summary.html
Thanks,
Shambhu.
Hello,
I used the command using the following code :
GetActiveWorkflowTasksCommand gawf = null;
try
{
gawf = new GetActiveWorkflowTasksCommand(usc);
}
catch(ConnectionException cc)
{
cc.printStackTrace();
}
gawf.setSession(sessionId);
gawf.setTableId(tables[0].getId());
try
{
gawf.execute();
wdComponentAPI.getMessageManager().reportSuccess("Active Jobs Success");
}
catch(CommandException ec)
{
ec.printStackTrace();
wdComponentAPI.getMessageManager().reportException(ec.getMessage(), true);
}
WorkflowTask[] acwf = gawf.getActiveWorkflowTasks();
but the Array acwf does not have any Workflow Tasks in it.
Pls help
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.