cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Example for Script Task

chandanmb1
Champ on-the-rise
Champ on-the-rise
Hello Team,

I am trying Script Task. I am just trying basic usage of Script Task without any use case yet.
Just to know how it works.

I tried


<scriptTask id="sid-AD08CD49-08D0-4910-9912-BB7C73637844" name="Script" scriptFormat="JavaScript" activiti:autoStoreVariables="false">
      <script><![CDATA[
alert("Welcome to activiti Javascript")
</script>]]>
    </scriptTask>



It got deployed. But when i start the Activiti. It throws an error alert is not a keyword.
Can you please provide some simple example so that i can just paste and run the activiti workflow?

Regards,
Chandan
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Chandan,

e.g. org.activiti.examples.bpmn.scripttask.ScriptTaskTest
in activiti source.

Regards
Martin

Hi Martin,

I am trying to use alert but am unable to get alert box, so kindly provide script task example.

warper
Star Contributor
Star Contributor

Hi Chandan

Alert is not available, it's not web browser script. Use something else, a bit less user-interactive.

You can import and use java classes if you want to write something to logs, for example.

Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.