Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Quick Launch

Average Rating:

(4 Ratings)
facebook Twitter
Email
Print Bookmark Alert me when this article is updated

Feedback

HOW TO: Use RunAJobcli utility to trigger the task in Informatica Intelligent Cloud Services
Content
What is RunAJob utility?

A command line tool used to trigger IICS Tasks. This utility internally uses the REST API service in order to execute IICS tasks.

This is a free tool shipped with Informatica Cloud Secure Agent.


Why is RunAJob utility needed?


One can have business requirements to run IICS jobs from an external application or check the status of a running task from a Third-Party scheduler. To achieve this requirement the Informatica REST API can directly be invoked. However, one needs to have an understanding of the REST framework, form the web requests for each action, execute it and parse the response. This could be complex and time-consuming. 

RunAJob utility simplifies this operation by performing these individual activities and encapsulating the internal requests and responses. The end user is required to provide only necessary information - for e.g. IICS Account details, Task details etc.


Setup


This tool is available at location "{AgentDir}\downloads\package-runAJobCli.2\ 


Ensure the Secure Agent Host has Java 1.8 or higher installed.


Configure the Login credentials of IICS on "restenv.properties" file located in "{AgentDir}\downloads\package-runAJobCli.2\package i". All the times are in milliseconds.


 baseUrl= baseURL of IICS sandbox or Production

 userName=<user name of the org where you want to run the task>

 password=<password of the above user>

 ACTIVITYMONITORWAIT=30000

 TOTALWAIT=60000

 PROXYHOST=

 PROXYPORT=

 RETRYCOUNT=30


             

More information on restenv.properties file contains below configuration parameters:


Parameters Description
baseURL For IICS Sandbox (preview environement) - https://dm-sandbox.informaticacloud.com/ma

For IICS Production environment - https://dm-us.informaticacloud.com/ma
userName Informatica Intelligent Cloud Services username
password Informatica Intelligent Cloud Services username
ACTVITYMONITORWAIT How many milliseconds tool has to waits before doing re-attempt to get task details from Activity monitor
TOTALWAIT 
How many milliseconds tool has to waits before pooling IICS for Activity monitor details
PROXYHOST
Proxy server machine name
PROXYPORT
Proxy server port no.
RETRYCOUNT Retry count used in login, Activity monitor and Activity Log retry login, by default 3


Syntax is as follows:

cli.bat runAJobCli -n <taskname> -t <tasktype> <-w true/false> <-d>

For example, you might use the following command for Data Synchronization Task (DSS):
cli.bat runAJobCli -n KM_DSS_Eloqua_01960367 -t DSS

Following are some of the switches/flags used in RunAJob utility:

-n   Name of the Task
-t   Task type (DSS-Data Synchronization Task, DRS-Data Replication Task, MTT- Mapping task, MCT-Mapping Configuration Task etc.)
-i    Task ID
-w  wait flag
-d    Debug flag. If enabled prints the ICS REST API requests along with responses.


Note that if you run the utility with the task name (-n) option, and you have multiple tasks with the same name in different folders, the utility runs the task in the Default folder. To run a task in a different folder, use the task ID (-i) option instead of the task name option.


RunAJob utility exit codes:

Exception: -1 
Success: 0
Warning: 1
NOWAIT: 2
Failure: 3
TIMEOUT: 4
ERROR: 5
Running: 6  

Internal working of RunAJob?

Following activities are internally triggered when RunAJob utility is invoked:

1. Login to IICS Cloud org using properties configured in retenv .properties

Additional information :

 Every IICS REST API call requires icSession parameter. An icSession similar to session id which authorizes the client interactions to IICS Server.

 RunAJob utility gets icSession through login API call for interactions with ICS.

2. Checks activity monitor for the given task to make sure that it is not already running. If task is already running in IICS, then utility exits along with printing job status.

3. If the task is not currently running, it will be invoked using Informatica REST API.

4. Once task is triggered, wait flag (-w) is checked :

    •  If wait flag (-w) is disabled then tool will exit with exit code as 6. This indicates that the task was submitted successfully.
    • By default, Wait flag is enabled.
    • Activity monitor is checked every TOTALWAIT milliseconds until RETRYCOUNT times. (inbuilt resiliency- If task status fetch fails, retry attempts are made based on the value configured for RETRYCOUNT. Between every retry attempt the utility sleeps for ACTIVITYMONITORWAIT period).
5. Once the task is completed, Activity log is retrieved to get the task status (if wait flag is enabled).


NOTE: to configure TOTALWAIT and RETRYCOUNT, please refer https://kb.informatica.com/howto/6/Pages/19/509792.aspx​

Best practices:

1. When RunAJob Utility is given in any pre/post session command or command line task in PowerCenter, then cli bat should be edited to change the directory to runAJob utility folder. Otherwise, CLASSNOTFOUND exception will be thrown for “RunAJobPlugin” class.

2. RunAJob utility needs Java version greater than 7.​​​​​​​​​


More Information


Reference


Attachments


Applies To
Product: Cloud Data Integration
Problem Type: Configuration
User Type: Architect
Project Phase: Configure
Product Version:
Database:
Operating System:
Other Software:

Last Modified Date: 11/10/2019 9:42 PM ID: 529320
People who viewed this also viewed

Feedback

Did this KB document help you?



What can we do to improve this information (2000 or fewer characters)