Skip to main content Skip to complementary content

Executing a task with context parameters using metaServlet

Procedure

  1. Open the Windows command line or Linux terminal, and go to the following directory: ./org.talend.administrator/WEB-INF/classes.
  2. Run:
    • MetaServletCaller.bat to call the metaServlet on Windows.
    • MetaServletCaller.sh to call the metaServlet on Linux.
  3. Type in the following script to execute task 1 with the context values of your choice :
    MetaServletCaller.bat 
    --tac-url=http://localhost:8080/org.talend.administrator 
    --json-params=
    
    "{
    
    'actionName':'runTask',
    'authPass':'TAC_Admin_password',
    'authUser':'TAC_Admin_username',
    'taskId':1,
    'mode':'synchronous',
    'context':{'firstname':'Robert','lastname':'Durst'}
    
    }"
    The response from the Talend Administration Center server is displayed in the command lines:

    Example

    The execution information is displayed in the Task execution details console of Talend Administration Center:

    Example

    'context':{'firstname':'Kimmy','lastname':'Schmidt'} in the script above specifies the values for the context parameters: firstname and lastname, you must follow the syntax below:
    'context':{'varname1':'varvalue'}
    Multiple context parameters should be separated by comma(s). You should replace the parameters used in the command with what they are in real contexts.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!