<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Workflow model question in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/workflow-model-question/m-p/137183#M36802</link>
    <description>&lt;P&gt;The problem, as fas as I understand, is this:&lt;/P&gt;&lt;PRE&gt;&amp;lt;mandatory&amp;gt;true&amp;lt;/mandatory&amp;gt;&lt;/PRE&gt;&lt;P&gt;If you have that property declared as mandatory, in order to launch the workflow that property should have content. For that reason is you launch from admin console, "start someco_message=AMessage"&amp;nbsp; it's working... because you are full fill in.&lt;/P&gt;&lt;P&gt;Check &lt;A href="https://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html" target="_self" rel="nofollow noopener noreferrer"&gt;this guide&lt;/A&gt; made by &lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/70191"&gt;@jpotts&lt;/A&gt; you have a really nice examples where you can start to learn how to make them properly.&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jun 2021 14:51:05 GMT</pubDate>
    <dc:creator>cristinamr</dc:creator>
    <dc:date>2021-06-16T14:51:05Z</dc:date>
    <item>
      <title>Workflow model question</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/workflow-model-question/m-p/137182#M36801</link>
      <description>&lt;P&gt;I have a workflow that has a user task,&amp;nbsp; that takes in a text field, and I want to print it to the logs.&amp;nbsp; I have a form key and model that look like this:&lt;/P&gt;&lt;PRE&gt; activiti:formKey="someco:getMessageTask"

&amp;lt;type name="someco:getMessageTask"&amp;gt;
   &amp;lt;parent&amp;gt;bpm:workflowTask&amp;lt;/parent&amp;gt;
    &amp;lt;properties&amp;gt;
        &amp;lt;property name="someco:message"&amp;gt;
            &amp;lt;type&amp;gt;d:text&amp;lt;/type&amp;gt;
            &amp;lt;mandatory&amp;gt;true&amp;lt;/mandatory&amp;gt;
            &amp;lt;multiple&amp;gt;false&amp;lt;/multiple&amp;gt;
        &amp;lt;/property&amp;gt;
    &amp;lt;/properties&amp;gt;
&amp;lt;/type&amp;gt;&lt;/PRE&gt;&lt;P&gt;I have have a then a sequence flow to the end event, and all it does is write to the log.&amp;nbsp; It looks like this&lt;/P&gt;&lt;PRE&gt;    &amp;lt;sequenceFlow id="SequenceFlow_2" sourceRef="EnterMessageTask" targetRef="EndEvent_1"&amp;gt;
      &amp;lt;extensionElements&amp;gt;
        &amp;lt;activiti:executionListener xsi:type="xsd:anyType" event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener"&amp;gt;
          &amp;lt;activiti:field xsi:type="xsd:anyType" name="script"&amp;gt;
            &amp;lt;activiti:string xsi:type="xsd:anyType"&amp;gt;&amp;lt;![CDATA[logger.log("Hello, " + someco_message + "!");]]&amp;gt;&amp;lt;/activiti:string&amp;gt;
          &amp;lt;/activiti:field&amp;gt;
        &amp;lt;/activiti:executionListener&amp;gt;
      &amp;lt;/extensionElements&amp;gt;
    &amp;lt;/sequenceFlow&amp;gt;&lt;/PRE&gt;&lt;P&gt;When I try and start the workflow,&amp;nbsp; I get an error message:&amp;nbsp; (As a site note,&amp;nbsp; I get this error as soon as I start, it's like alfresco compiles the script before running, which to me, it the exact opposite of what a "script" is)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"someco_message" is not defined. (AlfrescoJS#1)&lt;/PRE&gt;&lt;P&gt;Now when I start the workflow with that variable (in the admin console,&amp;nbsp; "start someco_message=AMessage"&amp;nbsp; it works fine.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But why?&amp;nbsp; I defined that variable in the model for the previous task.&amp;nbsp; If that's not the way to do it&amp;nbsp; (And im pretty sure it's not)&amp;nbsp; What is the point of a task model?&amp;nbsp; Is there a good tutorial/explanation on how to handle data in a workflow?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 00:37:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/workflow-model-question/m-p/137182#M36801</guid>
      <dc:creator>mangar</dc:creator>
      <dc:date>2021-06-16T00:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow model question</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/workflow-model-question/m-p/137183#M36802</link>
      <description>&lt;P&gt;The problem, as fas as I understand, is this:&lt;/P&gt;&lt;PRE&gt;&amp;lt;mandatory&amp;gt;true&amp;lt;/mandatory&amp;gt;&lt;/PRE&gt;&lt;P&gt;If you have that property declared as mandatory, in order to launch the workflow that property should have content. For that reason is you launch from admin console, "start someco_message=AMessage"&amp;nbsp; it's working... because you are full fill in.&lt;/P&gt;&lt;P&gt;Check &lt;A href="https://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html" target="_self" rel="nofollow noopener noreferrer"&gt;this guide&lt;/A&gt; made by &lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/70191"&gt;@jpotts&lt;/A&gt; you have a really nice examples where you can start to learn how to make them properly.&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 14:51:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/workflow-model-question/m-p/137183#M36802</guid>
      <dc:creator>cristinamr</dc:creator>
      <dc:date>2021-06-16T14:51:05Z</dc:date>
    </item>
  </channel>
</rss>

