Hello Everyone!
I prepared simple bash script (job.sh) with python.
#!/bin/bash
python - <<‘END_SCRIPT’
file_result = r’result.txt’
k = ‘Hello everyone. It is test message’
with open(file_result, ‘a’) as f:
f.write(k + ‘\n’)
END_SCRIPT
In Terminal it works correct but I can’t execute bash script in Flowable. I didn’t find Information how I can correct Shell Task fill in.
Sorry for late response, I was in Vacation.
I would like to a little bit changed my Question.
At this moment I prepared new “Form”, uploaded bash Script to this Form and now I hope bash Script available for Execution.
How I can make it? Use Groovy or JavaScript for execution bash Script?
I tried to make it from shell task:
1.I prepared User Task with “Upload” Panel in Form and uploaded shell script “job.sh”
Next, I prepared Schell Task with Parametrs
Command: chmod
Argument1: +x
Argument2: job.sh
Next I prepared Schell Task with Parametrs
Command: sh
Argument1: job.sh
Afterwards, I run this Process, everything is fine, without Errors, but I didn’t receive correct Result (file result.txt). You can see it from my code above.
What was wrong? How fill in shell task correct that I can get correct result?