Creating a Database Service Task

To call a database from a process, you use a Service task of type Database.

Procedure

  1. Open the GetLoginName process.
  2. Select the Get login name task.
  3. On the Properties view, General tab, change the Activity Type from Task to Service Task. The right-hand pane now displays a Service Type field.
  4. Change the Service Type to Database.
  5. Select the Operation that you want to execute on the database - in this case, SQL, to execute a SQL query.
  6. Enter the following query in the SQL field:
    • if the BPM runtime database uses SQL Server:
               SELECT "name"
               FROM "amxbpm"."de_resource"
               WHERE "resourcetype" = 'H'
               AND "name" LIKE ?
    • if the BPM runtime database uses Oracle or DB2:
               SELECT "NAME"
               FROM "DE_RESOURCE"
               WHERE "RESOURCETYPE" = 'H'
               AND "NAME" LIKE ?
      Note: If the BPM runtime database uses Oracle, change the attribute name in the business object model to NAME. This is necessary because of Oracle’s case sensitivity.

      This query will retrieve the login names of any users defined in the BPM runtime database whose names include the string that is passed as an input to the query.

  7. Save the process.