cancel
Showing results for 
Search instead for 
Did you mean: 

Automation chain - how to use parameters

laurent13_
Champ in-the-making
Champ in-the-making

I have a problem with an automation chain that I want to create.

This automation chain is created in order to find documents in section by using specifcs right access of a login passed in parameters.

It must do following steps :

  • get 2 parameters : 1 for login name, 1 for a section name
  • make connection with login name thanks to operation LoginAs
  • execute a query by using section name
  • return list of documents

This automation chain will be called by a php automation client.

My problems is :

  • How can I use parameters in an automation chain ?

Thank you in advance

1 ACCEPTED ANSWER

pibou_Bouvret
Elite Collaborator
Elite Collaborator

Hi, I m using the Context variable for such an operation chain :

capture

It s called this way from PHP :

$client = new NuxeoPhpAutomationClient(NUXEO_AUTOMATION_URL);
$session = $client->getSession(NUXEO_AUTOMATION_USER, NUXEO_AUTOMATION_PASSWD);
$session->newRequest("Chain.remove_all_docs")->set('params', 'doc_id', $id)->sendRequest(); 

View answer in original post

3 REPLIES 3

pibou_Bouvret
Elite Collaborator
Elite Collaborator

Hi, I m using the Context variable for such an operation chain :

capture

It s called this way from PHP :

$client = new NuxeoPhpAutomationClient(NUXEO_AUTOMATION_URL);
$session = $client->getSession(NUXEO_AUTOMATION_USER, NUXEO_AUTOMATION_PASSWD);
$session->newRequest("Chain.remove_all_docs")->set('params', 'doc_id', $id)->sendRequest(); 

Thanks for this well laid-out answer pibou

laurent13_
Champ in-the-making
Champ in-the-making

Thanks for your answer, it works.