Top
Systemwalker Runbook Automation Studio User's Guide
Systemwalker

C.1 Java Agent File (agentsConfig.xml)

Agent assigned to an activity node in agentsConfig.xml can be executed within a process instance as an activity.

File format

The <DMSRoot>/apps/<application ID>/agentsConfig.xml file is used to configure an agent and is part of a workflow application project.

A sample file is displayed below:

<ActionAgentList>
   <ActionAgent>
      <Name>@TestFrameAgent</Name>
      <Description>For tests. Returns the first arrow. </Description>
      <RetryInterval>20</RetryInterval>
      <EscalationInterval>1</EscalationInterval>
      <ClassName>com.fujitsu.iflowqa.testframe.TestFrameAgent
      </ClassName>
      <ClassPath>IBPMROOT/classes</ClassPath>
      <ConfigFile></ConfigFile>
   </ActionAgent>
</ActionAgentList>

The table below describes the tags:

Item

Description

<ActionAgentList>

List of agents.

<ActionAgent>

Definitions of a single agent.

Separate definitions for each agent must be coded within this tag.

<Name>

Name of the agent.

Value must start with a "@" to indicate that it is an agent. This name must be specified as the agent in charge of an activity node, and this activity must be set as an "Agent" activity. This means that the activity functions as an agent rather than as an ordinary activity.

<Description>

Simple description of the agent, generally explaining its function.

<RetryInterval>

Number of seconds between each invocation of an external service.

<EscalationInterval>

Number of failures after which a mail is to be sent to the system administrator.
Mail is sent every time the next escalation is reached (for example, if the value is 1, the system administrator is notified every time the agent fails).
Mail is sent to the address specified in the ServerEmailAddress parameter for the Admin Server.

<ClassName>

Name of the Java class associated with the agent - the class is the agent's function part.

<ClassPath>

Classpath of the Java class associated with the agent.
This tag is ignored in SaaS mode.

<ConfigFile>

Configuration file used by the agent.


Agent class

The class specified in <ClassName> is the procedure used by the agent to access external services - it will be hereafter referred to as the agent class. The agent class must implement the following interface:

package com.fujitsu.iflow.server.intf;
public interface ActionAgentInvoke
   {
      public String invokeService(ServerEnactmentContext sec, String configFile) throws Exception;

}

The agent class uses invokeService() to invoke external services and to accept data from those services. The agent then returns STRING type data to Systemwalker Runbook Automation which gives instructions for service actions.

Execution of an agent class results in one of the following: