Manage Workflows

SAP Workflow Service lets you build, run, and manage workflows, from simple approvals to end-to-end processes that span across organizations and apps. With an inbox app and custom-built UIs, you involve end users into business processes for decision making and data entry. The service comes with web-based tools for workflow modeling, APIs for consumption in custom apps, monitoring tools, and Fiori-based apps for end-user access. You can use JavaScript to embed custom business logic.

The SAP Asset Intelligence Network app only provides event-based integration with workflows that are modeled using the SAP Workflow service.

Integration of Workflows with SAP Asset Intelligence Network

Based on the action that has to be performed in SAP Asset Intelligence Network, the relevant events are triggered. For example, upon publishing a piece of equipment, a workflow can be created for further actions or assessments. We can configure SAP Workflow Service inSAP Asset Intelligence Network based on the following events:
Objects Events
Equipment
  • Create

  • Publish

  • Delete

  • Share

Models
  • Create

  • Publish

  • Delete

  • Share

Locations
  • Create

  • Publish

  • Delete

Functional Locations
  • Create

  • Publish

  • Revision

  • Delete

Configuring a Workflow

Prerequisite:

You must have a separate subscription to SAP Workflow to model workflows and use the asset central foundation workflow application. Refer to SAP Workflow ServiceInformation published on SAP site.

You can configure theSAP Workflow Service for the asset central foundation by following the steps explained in this topic:
  1. Customer workflow subscription

    Go to customer account space and service market place and subscribe to workflow. For more information, see Prepare to Create Workflows in SAP BTPInformation published on SAP site.

  2. Create workflow instance

    You can create workflow instance by going inside workflow service and new instance. Once you create an instance, you get client id and secret by which can be used in a destination creation that communicates to asset central foundation.

    The workflow_rest_url, clientid, clientsecret, and url are used to configure the destination.

  3. Create workflow destination

    • Go to subaccount and create new destination with <name>_workflow.

    • It is of basic authentication and user and password is client id and client secret we got in previous step.

    • An additional property content-endpoint also needs to be added. The value for the field would be workflow_rest_url (from step 2)

These are the only configurations required for SAP Asset Intelligence Network to access the workflow service.

Configuring Workflow Applications for SAP Intelligent Asset Management Fiori launchpad

Optionally, you can configure the Monitor Workflow apps in the SAP Fiori launchpad. For more information, see Create Workflow and My Inbox Tiles on SAP Fiori Launchpad.

Creating Custom Fiori Launchpad

  1. Download the relevant FLP content. Refer to the 'Upgrade Custom FLP Content' in the Update Guide.
  2. You can use Create Workflow and My Inbox Tiles on SAP Fiori Launchpad to integrate the workflow applications in the relevant SAP Asset Intelligence Network fiori launchpad that you have downloaded.

  3. You have to add a configuration code for workflows apps in CommonDataModel.json under the Start of the navigation pathportal Next navigation step portal-siteEnd of the navigation path file of the relevant product content that you have downloaded.

    Here is a sample code for configuring te workflow apps:

How to Use Workflow in SAP Asset Intelligence Network

Use

To automate the process of triggering a workflow (directly from SAP Asset Intelligence Network), you can configure SAP Asset Intelligence Network events like publish, delete to initiate the workflow. The workflow is initiated when the event is performed. The workflow can be modeled to meet various business scenarios.

  1. Go to Manage Workflows application.

  2. Select New.

  3. In the New Workflow Mapping, select the <Event Type>. Select the <Workflow> for the event type.

  4. Choose Save.

Context Data For a Workflow

You receive a JSON object as a context data to be used in a workflow. The format is similar to the sample code:
Field Description
id unique id for the message
source the relevant business object that the workflow is initiated for like, equipment, model, and so on.
specversion Event cloud version
type specifies the event type
datacontenttype json
time time at which the event is created
objectid specifies the id of the object for which the workflow is initiated
objectownerid the business partner id to which the object belongs
correlationid used for SAP Asset Intelligence Network log
triggeredorgid the business partner who is performing the action
  • id:

  • source

Result

Wherever the event is performed, the relevant workflow is triggered.