Universal Work List (UWL) for a Business User can be achieved via Duet Enterprise by extending pre-delivered Gateway data model for Workflow generic task. A business user can access all his workflow tasks as in a SharePoint list. User can take decision to Approve or Reject specific tasks. This can be achieved in 2 steps, extending workflow generic task model in ABAP and reworking on BDC model at SharePoint.
Pre-requisite
Modifications in Gateway system
Update WF GSDO
Update the IMG configuration for IWF_WF_GEN_TASK GSDO.
Transaction SPRO->SAP Reference IMG ->SAP Netweaver -> Gateway -> Former Development-> Former Generic Channel Development ->Generic Service data object (GSDO) -> GSDO Types and GSDO Contexts and GSI Impl. Execute this IMG node.
Make sure that your GSDO looks like in the screenshot. The CompName and GSDO Data Object Name must be blank. So if there is some value remove from these columns.
GSDO Type Name: IWF_WF_GEN_TASK
Provide the prefix name and package name. Make sure that you select Update operation.
A flat Web Service for UWL will get generated in the specified package.
2. Create a new BSO for IWF_WF_GEN_TASK.
A new BSO class has to be created to handle the UPDATE of a generic task. The existing BSO does not allow updating workflow task in ERP system.
method get_bop_map_get_update. |
vi. Save and activate the method. Also activate the new BSO class.
vii. Update the IMG configuration for IWF_WF_GEN_TASK GSDO. (Ignore if already done).Make sure that your GSDO looks like in the screenshot. The CompName and GSDO Data Object Name must be blank. So if there is some value remove from these columns.
This is a mandatory step, dont miss it.
Also update the GSI implementation for IWF_WF_GEN_TASK GSDO as shown in be below screenshot. Replace the class/interface for the Adaptation BSO with the newly created BSO class.
3. Create Inbound Mapper for handling update scenario.
Inbound mapper can be created via IMG => Service Consumption Layer Development => Consumer Adaptation => Consumer Inbound Mapping Integration : BAdi
· Implement the Update method of the Implementation class. The code in the update method is as follows.
Note : Make sure that you change the highlighted section depending upon the input of update method in the Web Service. (It should be of the same type as that of ls_input in the update method of provider class).
method /iwfnd/if_cal_badi_ib_mapping~map_update. |
1. 4. Test ABAP UWL Web Service.
You can test the Web Service via transaction se80. Navigate to package where web service is created. Click on the test icon on the top menu.
Select the operation as FIND_IWCNT_OM_WF_GEN_TASKBY_EL , the request should be as described in the following screenshot. (remove all the input filter values)
The output contain all the task assigned to the logged in user.
Once the service is tested in SharePoint, the solution can be extended in SharePoint layer.
Export the BDC model from the BDC browser and make the appropriate changes as mentioned below.
Modifications in Sharepoint side:
Ensure to remove all TypeDescriptors other than below mentioned TypeDescriptors from Finder/Specific Finder/Update methods:
<TypeDescriptor TypeName="System.String" ReadOnly="true" IdentifierName="WORKFLOW_TASK_ID" Name="WORKFLOW_TASK_ID" /> <TypeDescriptor TypeName="System.String" Name="STATUS_TXT" /> <TypeDescriptor TypeName="System.String" Name="TYPE" /> <TypeDescriptor TypeName="System.Decimal" Name="NOTE_COUNT" /> <TypeDescriptor TypeName="System.DateTime" Name="CREATED_AT"> <Interpretation> <NormalizeDateTime LobDateTimeMode="UTC" /> </Interpretation> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="GUI_LINK" /> <TypeDescriptor TypeName="System.String" Name="PRIORITY" /> <TypeDescriptor TypeName="System.DateTime" Name="START_DL"> <Interpretation> <NormalizeDateTime LobDateTimeMode="UTC" /> </Interpretation> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="ACT_DEC" /> <TypeDescriptor TypeName="System.String" Name="REASSIGN_BY" /> <TypeDescriptor TypeName="System.String" Name="ACTUAL_OWNER" /> <TypeDescriptor TypeName="System.String" Name="REASSIGN_TO" /> <TypeDescriptor TypeName="System.String" Name="LANGUAGE" /> <TypeDescriptor TypeName="System.String" Name="SUBJECT" /> <TypeDescriptor TypeName="System.String" Name="TASK_NAME" /> <TypeDescriptor TypeName="System.String" Name="ACT_DEC_AGENT" /> <TypeDescriptor TypeName="System.String" Name="CREATED_BY" /> <TypeDescriptor TypeName="System.String" Name="STATUS" /> <TypeDescriptor TypeName="System.DateTime" Name="END_DL"> <Interpretation> <NormalizeDateTime LobDateTimeMode="UTC" /> </Interpretation> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="RESERVED_BY" /> <TypeDescriptor TypeName="System.String" Name="DESCRIPTIODESCRIPTION" /> |
Sample BDC model with only relevant TypeDescriptors: Workflow_Task_Model
Create External List
After importing the updated BDC model in the Central Admin, create an External List with the name: WorkList corresponding to the uploaded Task entity.
Ensure that the WorkList gets populated with list of Workflow tasks & Update method executes successfully.
ACT_DEC field will be considered for updating status of Workflow task to Approve/Reject.
Field value: 0001 = Approve, 0002 = Reject.
This list can be easily extended to HTML 5 UI and rendered in a much user friendly way.
There are documents and blogs available in MSDN on "Enabling Sharepoint 2010 external lists on Silverlight UI".
Link: Retrieve List Items from External List
Link: Consuming SAP data on Silverlight UI
With this, Business Workflow Inbox in SAP system can now be replicated in SharePoint list via UWL.
A business user can take actions (approve/reject) on task items from Sharepoint and subsequent task will be updated in SAP system.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
23 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |