You would be required to create a workflow with tasks, using Forms or SAP UI5 as the user interface and with actions.The Mobile Card that you are going to create in next sections, will read from the same TCM oData API of Cloud foundry service that your Fiori Launchpad application My Inbox uses. For this blog post, let us pick up the workflow for Capex Approval Process. You can refer to the Mission, which will guide you step by step right from the setup to build, deploy and execution of the workflow.
Disclaimer: Using a capex workflow is just a recommendation, you can however build and deploy your own workflow as well with actions.
2. Setup Mobile Card and Configure Destination:
Once your workflow is ready and deployed in your Cloud Platform Account, you can now switch your focus to setting up the Mobile Card client and configuring a mobile destination.
A) This tutorial will guide you to access SAP Cloud Platform Mobile Services and configure SAP Mobile Cards Client on your mobile device.
B) Next, you need to configure Mobile Destination and you can use the Feature “Mobile Connectivity”. Launch the SAP Cloud Platform Mobile Services cockpit, navigate to the Mobile Applications -> SAP Mobile Cards -> Features -> Mobile Connectivity. You can get your destination quickly created using the capability “Use a Cloud Foundry Service” which will create and map the destination to the workflow instance(wm_workflow) your account in just a few seconds.
3. Creation of SAP Mobile Card: Now that you are through with the preliminary setup, comes the creation of card, to read and display tasks, using the SAP Cloud Platform Workflow Management APIs. In the SAP Cloud Platform Mobile Services Cockpit, go to Mobile Applications -> SAP Mobile Cards. Under Card Templates section, click on ‘Create Card Template’ icon.
Figure 5:Info
Figure 7:URLs
You can also add parameters to read the task name, title and task instance ID for subsequent usages.
These parameters will reflect in the Parameters tab:
Here is the sample HTML code which you can also try with :
<div id="mySimpleTemplate" class="myTemplate" data-type="text/x-handlebars-template">
<div class="header" style="height: 30px">
<div style="text-align: left;">
<span style="font-weight: bold; font-size: 24px; float: left; color: #ffffff; display: inline; padding-top: 8px">
{{d.TaskDefinitionName}}
</span>
</div>
<div style="text-align: right;">
<span style="float: right; clear: right; display: inline; font-size: 17px; color: #fafafa; padding-top: 4px">
{{d.TaskTitle}}
</span>
</div>
</div>
<div class="card-content">
<div class="listitem">
<div class="listitem-label">
<span>
Created By:
</span>
</div>
<br>
<div class="listitem-value">
<span>
{{d.CreatedBy}}
</span>
</div>
</div>
<div class="listitem">
<div class="listitem-label">
<span>
Priority:
</span>
</div>
<br>
<div class="listitem-value">
<span>
{{d.Priority}}
</span>
</div>
</div>
<div class="listitem">
<div class="listitem-label">
<span>
Status
</span>
</div>
<br>
<div class="listitem-value">
<span>
{{d.Status}}
</span>
</div>
</div>
<br>
<div class="listitem">
<div class="listitem-label">
<span>
Details
</span>
</div>
<br>
<div class="listitem-availability">
<span>
{{d.Description.Description}}
</span>
</div>
</div>
<br>
<br>
{{#each d.CustomAttributeData.results}}
<div style="clear:left; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;">
<span style="float:left; width:40%; text-align:left; font-weight:bold; text-overflow:ellipsis; overflow:hidden; white-space:nowrap">
{{Name}}
</span>
{{Value}}
</div>
{{/each}}
</div>
</div>
If you have custom attributes added to your tasks in the workflow, you can see it on your mobile card as well. All you need to do is to embed the custom attributes snippet, as present in the above sample code .
Figure 13:Header
Click on Save to save the newly created card template. You should get a success message and you will be brought to the SAP Mobile Cards Page.
Now, your card is almost ready. If you click on the card and within the Info tab, check the State of the card, it will be in Development. But in order to consume this card on your mobile device, you need to set the State to “Productive”. So, get ready to publish the card to make it consumable.
All you need to do is while you are still in the Info tab, scroll down to Versions table and click on the tick mark to set the card to Productive. You will get a confirmation popup, choose Yes and bingo, your card is ready to be subscribed.
4. View and Act on Tasks from SAP Mobile Card: Here comes the milestone, which is to view the assigned tasks on your mobile device and action them. But wait, have you still subscribed to the card? You may have not! Let's do it!
Just follow the “Step 4: Subscribe to the card in SAP Mobile Cards:" of the mentioned tutorial here. The tutorial might speak for a different card to subscribe, but in general subscription method remains the same, so it’s all good ?
Next, you need to make sure you have some tasks generated by workflow in you Inbox application of the Fiori Launchpad. If not yet, then just follow these simple steps:
Now, the wait finally is about to end! ?
Just open the Mobile Card application on your mobile device (Android/iOS). Do a pull refresh (in case you do not see the new card yet). You should be able to see the new tasks downloaded as Mobile Cards.
Just remember, if still the card does not download, you may need to Unsubscribe and Subscribe to the card again.
Once you have subscribed to the card, you will also receive push notification on your mobile device for the assigned tasks with actions. You can either take action from the notification or, once the card is downloaded with the task, you will be able to use the action button in the bottom left corner to Approve or Reject or Rework, based on the decisions you have defined in the workflow form.
Click on any action (Accept/Reject/Rework) to trigger the next steps. Once the action is successful, you can either verify the My Inbox app of the FLP or your mobile card app itself.That completed task should disappear, and it may trigger another subsequent task (equivalent to another card on your mobile device), or can terminate the process, depending on how the workflow is configured. And, for the subsequent tasks generated, you will see new mobile cards and you can take actions from your mobile device on the go!
Another interesting highlight would be the custom attributes which you can see on the mobile card, if you have it configured in your workflow tasks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
26 | |
16 | |
15 | |
13 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 |