cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve record and workflow task data

Former Member
0 Kudos

Hello,

I am new to MDM and i would need some walk through on how to develop an application in java that can retrieve records and workflow data from the MDM repository using the current Java api.

Thanks.

Edited by: SAP GeEk... on Aug 15, 2008 12:25 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi SAP Geek,

For Retrieving Records,

Check: http://help.sap.com/javadocs/MDM/SP06P2/com/sap/mdm/data/commands/RetrieveLimitedRecordsCommand.html

For Workflows,

Check:

http://help.sap.com/javadocs/MDM/SP06P2/com/sap/mdm/workflow/commands/RetrieveWorkflowTasksCommand.h...

Also there are some examples given in JavaDocs which you can check here:

http://help.sap.com/javadocs/MDM/SP06P2/com/sap/mdm/examples/package-summary.html

Please let me know if you have any specific doubts

Regards,

Mausam

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Experts,

Thank you for the links which are really very helpful. Using them i could develop on manipulating the records but i would also like to know how to search and delete the workflow task jobs.

Because if a record is stored in the workflow task we cannot delete it due this dependency. So i also need the coding style for workflow tasks.

Thanks.

Former Member
0 Kudos

Hi Aparna,

Please refer the link below on

Creating Custom-Built Applications with SAP NetWeaver Master Data Management (MDM) Java API - Webinar Presentation -

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10337d07-e54a-2b10-4fbd-9caeb2c1...

I am not quite sure that we can delete the tasks present in the Workflow but this doc will tell you the commands that you can use for deleting, modifying, retrieving, creating etc.

You can atleast it out.

Hope it helps.

Former Member
0 Kudos

Hi,

You can use the class RemoveRecordsFromWorkflowJobCommand -- to remove the records that is assigned to a workflow. -- input is workflowJobId.

RetrieveWorkflowTaskActionsCommand --- to search for workflow task.

You can refer to com.sap.mdm.workflow.commands and com.sap.mdm.workflow classes.. for different options of create, search and delete of workflow records.

http://help.sap.com/javadocs/MDM/SP06/

Thanks,

Priya.

Former Member
0 Kudos

Hi Aparna,

Please refer the Below link

http://help.sap.com/javadocs/MDM/SP06P2/index.html

Navigate to package com.sap.mdm.workflow.commands

DeleteWorkflowtaskCommand is used to delete the workflow which needs the setJobId as a required parameter. Once you have set this paramater use Execute command to delete the workflow task.

RetrieveWorkflowByIdCommand can be used to search the workflow task.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hello Jitesh,

I have gone through the link for API you have posted and i can code to access the workflow jobs and also to delete the specofic workflow job.

Now when i am trying to delete the record it shows an exception "The record is currently used in workflow".

How do i delete the workflow. I have also searched but i could not find "DeleteWorkflowtaskCommand" in the api.

Could you help me in this regard.

Thanks.

Former Member
0 Kudos

Hi Aparna,

Sorry it was my mistake for deleting the workflow, API available is DeleteWorkflowJobCommand and you cannot delete the record present in the workflow, so in order to remove the records from the workflow you have to use the RemoveRecordsFromWorkflowJobCommand API that needs WorkflowJobId as the required parameter.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

Thanks a lot i can now retriev and also delete the tasks along with the records assigned to that tasks.

Now i would like to seek your help in second scenario where we have a UWL iview in which the table shows the columns like task name, job id, created by..........and so on. Now i want to fetch jobid column value from this webdynpro iview and pass it to my java application.

Could you tell me the concept to pass parameters.

Thanks.

Former Member
0 Kudos

Hi Aparna,

This can be achieved using EPCF eventing. We have discussed this requirement in the below threat. Also you can refer the code posted in my reply. You will surely get your requirement fulfilled.

Regards,

Jitesh Talreja

namrata_d
Active Participant
0 Kudos

Hi Aparna,

For passing JobID from UWL iview ,you need to mention it in your UWL Configuration file as one of the parameter

<Property name="taskId" value="${item.jobId}"/>

Thanks

Namrata

Former Member
0 Kudos

Hello,

I have a different problem occuring now. When i deploy my application on the sandbox server it working perfect. But when i am deploying it back on dev server it throws this exception:

com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: The specified MDM repository was not found on the server

at com.sap.mdm.commands.GetRepositoryRegionListCommand.execute(GetRepositoryRegionListCommand.java:96)

at com.amat.mdm.MDMDelete.main(MDMDelete.java:135)

Caused by: com.sap.mdm.internal.protocol.manual.ServerException: The specified MDM repository was not found on the server

at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:112)

at com.sap.mdm.commands.GetRepositoryRegionListCommand.execute(GetRepositoryRegionListCommand.java:84)

Can anyone give me solution how to resolve this error.

Thanks.

namrata_d
Active Participant
0 Kudos

Hi Aparna,

This error specifies that for creating connection through API 2 . you are mentioning incorrect parameters for the Development Server. Might be you would have hardcoded the values for the Sandbox MDM Server and running the same on Development Server.

Just check you MDM server parameters once.

Thanks

Namrata

Former Member
0 Kudos

Hi Aparna,

Restart the J2ee Engine of the server and then deploy it again.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Namratha,

I have checked the MDM server properties and i have entered them correctly. Is there any other way to figure out why this repository is not loading.

Thanks.

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

Please refer to the below White papaer on Java API's.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70a7afe4-9e3e-2b10-de8d-b105d0b8...

Thanks,

Priya.