Show TOC

Using Substitution Profiles with the BPM APILocate this document in the navigation structure

The Business Process Management (BPM) application programming interfaces (APIs) allow you to create, read, update, and delete substitution profiles.

Substitution profiles allow you to categorize tasks, which allows more specific task forwarding based on the task model. For example, you can do the following:

  • Create a new substitution profile and assign task models to it
  • Add or remove task models from an existing substitution profile
  • Add localized descriptions to existing or new profiles

For a detailed description of the BPM public API, see http://help.sap.com/javadocs.

We describe below how you use the BPM APIs to create, read, update, and delete substitution profiles.

Authorization Concept of the Substitution Profiles Manager

You need special authorizations to create, read, update, or delete substitution profiles. For each operation a permission check is defined in the SubstitutionProfilesManager of the BPM public API. If the user does not have the authorization for an operation, an exception (BPMIllegalAccessException) is thrown. For more information about authorizations, roles, and actions, see Authorizations and Roles.

Read Operations

If you want to perform read operations on substitution profiles, the SAP_BPM_Substitution_Profile_ReadAll action must be assigned to your user. The action is assigned to the BPEM End User role by default.

To retrieve information about substitution rules, the SubstitutionProfilesManager of the BPM public API provides the following methods:

  • getAllProfiles

    Retrieves all the substitution profiles.

  • getProfileById

    Returns the substitution profile with the given substitution profile ID.

  • getProfileByKey

    Returns the substitution profile with the given substitution profile key.

Write Operations

If you want to create, update, or delete a substitution profile, the SAP_BPM_Substitution_Profile_WriteAll action must be assigned to your user or user role.

  • createProfile and storeProfile

    You can use the createProfile method to create a new substitution profile. This substitution profile is not automatically persisted. To persist it, use the storeProfile method. You can provide the task model IDs that should be assigned to the substitution profile as a parameter for the createProfile method.

  • setDefaultName and setKey

    To modify the default name or the key of the substitution profile you use the setDefaultName or setKey method, respectively.

  • setTaskModelIds

    You can use the setTaskModelIds method to update the set of tasks assigned to the substitution profile. Make sure that the task assignments you want to keep are also contained in the set of tasks you provide as a parameter of this method.

  • setLocalizedNames

    The setLocalizedNames method allows you to update the translated names of substitution profiles. The current names are replaced by the map you provide as a parameter of this method.

Search for Task Models

To enable an administrator to easily find the task models that should be assigned to a certain substitution profile, the TaskModelManager of the BPM public API offers the following method:

  • getTaskModelsByName

    Searches for task models by the given task model name search string and, optionally, by the given locale.
    Note If the method is used without a locale, the locale of the logged-on user is used.