Hi there,
I’ve got a question regarding using temporal CLI to pass multiple parameters via input command. e.g. my workflow signature is :
createAccount(String payload, CashAccountDto request, String workflowId); //return value omitted
My CLI is:
temporal workflow start \
--type CreateAccountWorkFlow \
--task-queue your-task-queue \
--workflow-id my-first-workflow \
--input '"CMH-12345" \
{ \
"workingCashAccountName": "Some Account1", \
"hasError": true \
} \
"my-first-workflow"'
but it prompted me
level=ERROR msg="input #1 is not valid JSON"
Could someone help me to figure out what’s the problem and how I should pass these parameters?
Thanks a lot.
Hi there, is anyone able to answer the question? Thanks a lot. 
I have the same question. No examples of how to pass multiple parameters. If I put valid JSON into a file and pass --input-file, workflow starts, but then immediately fails because it can’t parse out the input.
Was also looking for examples and couldn’t find any but in the code it says that --input can be passed multiple times to pass multiple arguments
See line 4418 here: cli/temporalcli/commandsgen/commands.yml at 5b3e0790a2bbf9f2287dabe33cff80dcd9183a72 · temporalio/cli · GitHub
Tried it and it worked on my CLI instance
temporal workflow start \
--task-queue my-task-queue \
--type myWorkflow \
--workflow-id $(openssl rand -hex 32) \
--input 'param1' --input 'param2'
hi,
this should work with the latest temporal cli version
temporal workflow start \
--task-queue my-task-queue \
--type myWorkflow \
--workflow-id $(openssl rand -hex 32) \
--input '{"text1":"value1"}' --input '{"text1":"value2"}'
1 Like