Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

5.1.5 Reference for Each API

5.1.5.1 Process Definition Interface

This section describes the interface relating to process definitions.

Action

HTTP method

URI

Remarks

Obtain process definitions

GET

/rbaserver/ProcessDefinitions

5.1.5.1.1 Obtain process definitions

Description

This API obtains a list of process definitions.

Request URI

/rbaserver/ProcessDefinitions

HTTP Method

GET

Request Parameters

Parameter name

Required?

Item

Item description

state

Description

Process definition state

Type

string ASCII

Value

Select one of the following values. To specify multiple values, separate each value with a comma.

"draft": Searches for process definitions in draft state

"published": Searches for process definitions in published state

"obsolete": Searches for process definitions that have been discontinued
If this parameter is not specified, the API will target process definitions in all states.

appid

Description

Automated Operation Process Group ID

Type

string UTF-8

Value

Specify an Automated Operation Process Group ID. If this parameter is not specified, the API will target all Automated Operation Process Group IDs.

pdname

Description

Process definition name

Type

string UTF-8

Value

Specify a process definition name. If this parameter is not specified, the API will target all process definition names.

namematch

Description

Search conditions

Type

string ASCII

Value

Specify the search pattern for process definition names if the pdname parameter has been specified. If this parameter is omitted, the API will conduct searches using complete matches. Select one of the following values:

"forward": Matches the front part of the process definition name

"backward": Matches the last part of the process definition name

Sample Request

GET /rbaserver/processdefinitions HTTP/1.1
Host: rbamanager.systemwalker.fujitsu.com
Authorization: Basic c3dyYmFhZG1pbjpzeXN0ZW13YWxrZXIjMQ==

Response

<Status code>

This API returns the following status codes.

Code

Description

200 OK

The request was successful. This code is returned even if an error occurs in the subsequent processing after the request is received.

401 Unauthorized

Authentication information has not been specified.

<XML>

<?xml version="1.0" encoding="UTF-8"?>
<ProcessDefinitionResponse xmlns="http://rba.systemwalker.fujitsu.com">
    <responseStatus>[status of the response]</responseStatus>
    <responseMessage>[response message]</responseMessage>
    <processDefinitions>
        <processDefinition>
            <applicationId>[Automated Operation Process Group ID]</applicationId>
            <processId>[process ID] </processId>
            <name>[process definition name]</name>
            <version>[version]</version>
            <status>[status]</status>
            <owner>[owner]</owner>
            <lastupdate>[date of the last update]</lastupdate>
        </processDefinition>
    </processDefinitions>
</ProcessDefinitionResponse>

<Elements>

Element name

Item

Item description

ProcessDefinitionResponse

Description

Element holding the response information

Type

None

Number of occurrences

1

responseStatus

Description

Status of the response. Refer to "5.2 Response Status Error Codes" for details.

Type

string ASCII

Number of occurrences

1

responseMessage

Description

Response message. Refer to "5.3 Response Messages" for details.

Type

string ASCII

Number of occurrences

1

processDefinitions

Description

Element holding the response information for the process definition information

Type

None

Number of occurrences

0..1

processDefinition

Description

Response containing process definition information

Type

None

Number of occurrences

0..*

applicationId

Description

Automated Operation Process Group ID

Type

string UTF-8

Number of occurrences

1

processed

Description

Process ID

Type

string ASCII

Number of occurrences

1

name

Description

Process definition name

Type

string UTF-8

Number of occurrences

1

version

Description

Version

Type

string ASCII

Number of occurrences

1

status

Description

Process definition state. The following values are set:

"draft": Draft state

"published": Published state

"obsolete": Discontinued

"deleted": Deleted state

"private": Registration or update processing in progress

Type

string ASCII

Number of occurrences

1

owner

Description

Owner

Type

string UTF-8

Number of occurrences

1

lastupdate

Description

Date of the last update (GMT)

Type

Datetime

Number of occurrences

1

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<ProcessDefinitionResponse xmlns="http://rba.systemwalker.fujitsu.com">
    <responseStatus>SUCCESS</responseStatus>
    <responseMessage>Process was completed.</responseMessage>
    <processDefinitions>
        <processDefinition>
            <applicationId>Sample</applicationId>
            <processId>10</processId>
            <name>Sample</name>
            <version>1.0</version>
            <status>draft</status>
            <owner>swrbaadmin</owner>
            <lastupdate>2011-04-27T05:49:56</lastupdate>
        </processDefinition>
    </processDefinitions>
</ProcessDefinitionResponse>

5.1.5.2 Process Instance Interfaces

This section describes the interfaces relating to process instances.

5.1.5.2.1 Start a process

Description

This interface starts a process.

Request URI

/rbaserver/ProcessInstances

HTTP Method

POST

Request Parameters

Parameter name

Required?

Item

Item description

appid

Yes

Description

Automated Operation Process Group ID

Type

string UTF-8

Value

Specify the ID of the Automated Operation Process Group to be searched.

pdname

Yes

Description

Process definition

Type

string UTF-8

Value

Specify a process definition name.

pdversion

Description

Version of the process definition

Type

string ASCII

Value

Specify the version of the process definition to be started. If this parameter is omitted, the API will start the latest version.

Request Body

Specify the parameter information required for the process to be started. The specification format is the Java property format.

Specify "text/plain" for the content type ("Content-type") and "UTF-8" for the character encoding ("charset").

The content type must be specified even if no parameter information is specified.

Sample Request

POST /rbaserver/ProcessInstances?appid=apl1&pdname=sample HTTP/1.1
Host: rbamanager.systemwalker.fujitsu.com:8009
Authorization: Basic c3dyYmFhZG1pbjpzeXN0ZW13YWxrZXIjMQ==
Content-type: text/plain; charset=utf-8

UDA1=value1
UDA2=value2

Response

<Status code>

This API returns the following status codes.

Code

Description

200 OK

The request was successful. This code is returned even if an error occurs in the subsequent processing after the request is received.

401 Unauthorized

Authentication information has not been specified.

<XML>

<?xml version="1.0" encoding="UTF-8"?>
<ProcessInstanceResponse xmlns="http://rba.systemwalker.fujitsu.com">
    <responseStatus>[status of the response]</responseStatus>
    <responseMessage>[response message]</responseMessage>
</ProcessInstanceResponse>

<Elements>

Element name

Item

Item description

ProcessDefinitionResponse

Description

Element holding the response information

Type

None

Number of occurrences

1

responseStatus

Description

Status of the response. Refer to "5.2 Response Status Error Codes" for details.

Type

string ASCII

Number of occurrences

1

responseMessage

Description

Response message. Refer to "5.3 Response Messages" for details.

Type

string ASCII

Number of occurrences

1

processInstances

Description

Element holding the response information for the process instance information

Type

None

Number of occurrences

0..1

processInstance

Description

Response containing process instance information

Type

None

Number of occurrences

0..*

id

Description

Process instance ID

Type

string ASCII

Number of occurrences

1

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<ProcessInstanceResponse xmlns="http://rba.systemwalker.fujitsu.com">
    <responseStatus>SUCCESS</responseStatus>
    <responseMessage>Process was completed.</responseMessage>
    <processInstances>
        <processInstance>
            <id>12013</id>
        </processInstances>
    </processInstances>
</ProcessInstaneceResponse>
5.1.5.2.2 Obtain a list of process instances

Description

This interface obtains a list of process instances.

Request URI

/rbaserver/ProcessInstances

HTTP Method

GET

Request Parameters

Parameter name

Required?

Item

Item description

startedafter

Description

The start date of the period for which the target process was running

Type

string ASCII

Value

Specify the date using "yyyy-mm-dd" format.

startedbefore

Description

The end date of the period for which the target process was running

Type

string ASCII

Value

Specify the date using "yyyy-mm-dd" format.

state

Description

Process definition state

Type

string ASCII

Value

Specify the following values. To specify multiple values, separate each value with a comma.

"running"

"closed"

"suspended"

"aborted"

"created"

"error"

piid

Description

Process instance ID

Type

string ASCII

Value

Specify a process instance ID. To specify multiple process instance IDs, separate each ID with a comma. If this parameter is omitted, the API will target all process instance IDs.

pdname

Description

Process definition name

Type

string UTF-8

Value

Specify a process definition name. To specify multiple process definition names, separate each name with a comma. If this parameter is omitted, the API will target all process definitions.

namematch

Description

Search pattern

Type

string ASCII

Value

Specify the search pattern for a process definition name. If this parameter is omitted, the API will conduct searches using complete matches. Select one of the following values.

"forward": Matches the front part of the process definition name

"backward": Matches the last part of the process definition name

initiator

Description

The ID of the user starting the process

Type

string ASCII

Value

Specify the ID of the user that started the process. To specify multiple user IDs, separate each ID with a comma. If this parameter is omitted, the API will target all user IDs.

appid

Description

Automated Operation Process Group ID

Type

string UTF-8

Value

Specify the ID of the Automated Operation Process Group to be searched. If this parameter is omitted, the API will search for all Automated Operation Process Group IDs.

Sample Request

GET /rbaserver/ProcessInstances?state=running&appid=TEST&pdname=Sample HTTP/1.1
Host: rbamanager.systemwalker.fujitsu.com:8009
Authorization: Basic c3dyYmFhZG1pbjpzeXN0ZW13YWxrZXIjMQ==

Response

<Status code>

This API returns the following status codes.

Code

Description

200 OK

The request was successful. This code is returned even if an error occurs in the subsequent processing after the request is received.

401 Unauthorized

Authentication information has not been specified.

<XML>

<?xml version="1.0" encoding="UTF-8"?>
<ProcessInstanceResponse xmlns="http://rba.systemwalker.fujitsu.com">
    <responseStatus>[status of the response]</responseStatus>
    <responseMessage>[response message]</responseMessage>
    <processInstances>
        <processInstance>
            <id[process instance ID]</id >
            <name>[process definition name]</name>
            <status>[status]</status>
            <initiator>[initiator]</initiator>
        </processInstance>
    </processInstance>
</ProcessInstanceResponse>

<Elements>

Element name

Item

Item description

ProcessInstanceResponse

Description

Element holding the response information

Type

None

Number of occurrences

1

responseStatus

Description

Status of the response. Refer to "5.2 Response Status Error Codes" for details.

Type

string ASCII

Number of occurrences

1

responseMessage

Description

Response message. Refer to "5.3 Response Messages" for details.

Type

string ASCII

Number of occurrences

1

processInstances

Description

Element holding the response information for the process instance information

Type

None

Number of occurrences

0..1

processInstance

Description

Response containing process instance information

Type

None

Number of occurrences

0..*

id

Description

Process instance ID

Type

string ASCII

Number of occurrences

1

name

Description

Process instance name

Type

string UTF-8

Number of occurrences

1

status

Description

State of the process instance. One of the following values is set:

"running"

"closed"

"suspended"

"aborted"

"created"

"error"

Type

string ASCII

Number of occurrences

1

initiator

Description

User who started the process instance

Type

string UTF-8

Number of occurrences

1

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<ProcessInstanceResponse xmlns="http://rba.systemwalker.fujitsu.com">
    <responseStatus>SUCCESS</responseStatus>
    <responseMessage>Process was completed.</responseMessage>
    <processInstances>
        <processInstance>
            <id>1234</id>
            <name>Sample</name>
            <status>running</status>
            <owner>swrbaadmin</owner>
        </processInstance>
    </processInstances>
</ProcessInstanceResponse>
5.1.5.2.3 Obtain details of process instances

Description

This interface obtains detailed information on process instances.

Request URI

/rbaserver/ProcessInstances/{piid}

piid: Process instance ID

HTTP Method

GET

Request Parameters

None

Sample Request

GET /rbaserver/ProcessInstances/1234 HTTP/1.1
Host: rbamanager.systemwalker.fujitsu.com
Authorization: Basic c3dyYmFhZG1pbjpzeXN0ZW13YWxrZXIjMQ==

Response

<Status code>

This API returns the following status codes.

Code

Description

200 OK

The request was successful. This code is returned even if an error occurs in the subsequent processing after the request is received.

401 Unauthorized

Authentication information has not been specified.

<XML>

<?xml version="1.0" encoding="UTF-8"?>
<ProcessInstanceResponse xmlns="http://rba.systemwalker.fujitsu.com">
    <responseStatus>[status of the response]</responseStatus>
    <responseMessage>[response message]</responseMessage>
    <processInstances>
      [This tag contains XML in the same format as is output by pi-get option of the swrba_admin command]
    </processInstances>
</ProcessInstanceResponse>

<Elements>

Element name

Attribute

Item

Item description

ProcessInstanceResponse

-

Description

Element holding the response information

Type

None

Number of occurrences

1

responseStatus

-

Description

Status of the response. Refer to "5.2 Response Status Error Codes" for details.

Type

string ASCII

Number of occurrences

1

responseMessage

-

Description

Response message. Refer to "5.3 Response Messages" for details.

Type

string ASCII

Number of occurrences

1

processInstances

-

Description

Element holding the response information for the process instance information

Type

None

Number of occurrences

0..1

processInstance

-

Description

Response containing process instance information

This is the same as the XML format output by the pi-get option of the swrba_admin command. Refer to "2.4 Detailed Information File for Process Instance" for details.

Type

None

Number of occurrences

0..1

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<ProcessInstanceResponse xmlns="http://rba.systemwalker.fujitsu.com">
    <responseStatus>SUCCESS</responseStatus>
    <responseMessage>Process was completed.</responseMessage>
    <processInstances>
        <Processinstance Completed="" Id="1598173" Initiator="swrbaadmin" Name="pilist_1" Owner="swrbaadmin" Started="2011-03-18 22:56:37" Status="running">
            <Node Form="" Id="1598174" Name="Start" Status="Completed" Type="Start"/>
            <Node Form="" Id="1598175" Name="Activity1" Status="Running" Timer="" Type="Activity"/>
            <Node Id="1598176" Name="Exit1" Status="Initial" Type="Exit"/>
            <UDA Name="A" Type="STRING" Value=""/>
            <UDA Name="B" Type="STRING" Value=""/>
            <History ConsumerId="1598173" ConsumerType="7" EventCode="0" EventData="" EventTYPE="__ProcessCreated" Id="1598179" IsHandled="4" ProducerId="1598173" ProducerType="7" Timestamp="2011-03-18 22:56:37"/>
            <History ConsumerId="1598173" ConsumerType="7" EventCode="0" EventData="" EventTYPE="__Start" Id="1598180" IsHandled="1" ProducerId="1598173" ProducerType="7" Timestamp="2011-03-18 22:56:38"/>
            <History ConsumerId="1598174" ConsumerType="3" EventCode="1" EventData="" EventTYPE="__Activate" Id="1598181" IsHandled="1" ProducerId="1598173" ProducerType="7" Timestamp="2011-03-18 22:56:38"/>
            <History ConsumerId="1598174" ConsumerType="3" EventCode="0" EventData="" EventTYPE="__NodeClosed" Id="1598182" IsHandled="4" ProducerId="1598174" ProducerType="3" Timestamp="2011-03-18 22:56:38"/>
            <History ConsumerId="1598175" ConsumerType="3" EventCode="1" EventData="" EventTYPE="Action 1" Id="1598183" IsHandled="1" ProducerId="1598177" ProducerType="0" Timestamp="2011-03-18 22:56:38"/>
        </Processinstance>
    </processInstances>
</ProcessInstaneceResponse>