cancel
Showing results for 
Search instead for 
Did you mean: 

Execute workflow for a Record in MDM thorugh Webdynpro Java

Former Member
0 Kudos

Hello,

I am creating a Webdynpro Java Application to listen to the Save event on the Item Edit iview through Eventing, the application is called on that event and RecordID is fetched in the code.

Now I want to trigger the workflow for that Record being edited using the Record ID.

How can I achieve the same using the MDM Java APIs?

Any help would be highly appreciated.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

This might be useful to you,

AddRecordsToWorkflowJobCommand

public AddRecordsToWorkflowJobCommand(ConnectionAccessor connection)

Creates an instance of this command.

Parameters:

connection - the connection to the server

Thanks,

Ravi

Former Member
0 Kudos

Hello,

I am using the following code to execute the Job for the Workflow :

LaunchWorkflowJobCommand LWJC = new LaunchWorkflowJobCommand(connections);

LWJC.setSession(session);

WorkflowJobId WJID = new WorkflowJobId(wfjc.getWorkflowJobId()); // where wfjc is of Type CreateWorkflowJobCommand

LWJC.setJobId(WJID);

try

{

LWJC.execute();

}

catch (CommandException e)

{

e.printStackTrace();

return;

}

but at runtime it gives me the following exception :

com.sap.mdm.internal.protocol.manual.ServerException: Illegal value for parameter

Please help me on why this exception is occuring .

Any help would be highly appreciated.

Thanks.

Former Member
0 Kudos

This error is basically for Portal server not able to connect MDM Server.

First suggestion is to restart portal server and try your code.

Second suggestion to confirm whether Portal server is able to connect to MDM server using System object connection settings in portal.

Thanks,

Shambhu.

Former Member
0 Kudos

Hello ,

Thanks for the reply. I restarted the Portal server, still getting the same error and the Portal server is connected to the MDM Repository since I am able to get in the Workflow Job Id number as WFJ<Unique number> after executing the CreateWorkflowJobCommand.

Please help.

Former Member
0 Kudos

Hello,

I have the same exception, but workflow is successfully starting. So i have to suppress this exception in catch block.

Anybody know how to aviod this exception?

Thanks.

Answers (0)