<?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: Pass values to activiti bpmn xml file from spring boot application.properties file. in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/pass-values-to-activiti-bpmn-xml-file-from-spring-boot/m-p/19230#M8511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to solve this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the Java Delegate approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Create a Java Delegate Class with the properties you need to pass .&lt;/P&gt;&lt;P&gt;2.Generate&amp;nbsp;getters and setters for these properties.&lt;/P&gt;&lt;P&gt;3.Pull the values from application.properties or any other property file you are using for your application.&lt;/P&gt;&lt;P&gt;4.For pulling the values in spring boot application I used @Value annotation .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.Below is how my process bpmn looks like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;serviceTask id="createMailTask" name="Create Mail Task"&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; activiti:type="mail" activiti:class="com.org.activiti.model.TestInjectedField"&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;extensionElements&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;activiti:field name="to"&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; expression="${testInjectedField.recipient}" /&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;/activiti:field&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;/extensionElements&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;/serviceTask&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.Java Delegate Class&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;com.org.activiti.model&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;import org.activiti.engine.delegate.DelegateExecution;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;import org.activiti.engine.delegate.JavaDelegate;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;import org.springframework.beans.factory.annotation.Value;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;import org.springframework.stereotype.Component;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;@Component("testInjectedField")&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;public class TestInjectedField implements JavaDelegate {&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;@Value("${recipient}")&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; private String recipient;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;public String getRecipient() {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; return recipient;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;public void setRecipient(String recipient) {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; this.recipient = recipient;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;public void execute(DelegateExecution execution) throws Exception {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Thanks&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Mar 2018 20:50:50 GMT</pubDate>
    <dc:creator>raghureddy</dc:creator>
    <dc:date>2018-03-23T20:50:50Z</dc:date>
    <item>
      <title>Pass values to activiti bpmn xml file from spring boot application.properties file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pass-values-to-activiti-bpmn-xml-file-from-spring-boot/m-p/19229#M8510</link>
      <description>Hi&amp;nbsp;Is there any way to pass external properties to process bpmn file with spring boot from application.properties file.Example :&amp;nbsp;&amp;lt;activiti:field name="from"&amp;gt; &amp;lt;activiti:string&amp;gt;&amp;lt;![CDATA[${recipient}@gmail.com]]&amp;gt;&amp;lt;/activiti:string&amp;gt; &amp;lt;/activiti:field&amp;gt;I am trying to pass the&amp;nbsp;r</description>
      <pubDate>Fri, 23 Mar 2018 18:38:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pass-values-to-activiti-bpmn-xml-file-from-spring-boot/m-p/19229#M8510</guid>
      <dc:creator>raghureddy</dc:creator>
      <dc:date>2018-03-23T18:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Pass values to activiti bpmn xml file from spring boot application.properties file.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pass-values-to-activiti-bpmn-xml-file-from-spring-boot/m-p/19230#M8511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to solve this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the Java Delegate approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Create a Java Delegate Class with the properties you need to pass .&lt;/P&gt;&lt;P&gt;2.Generate&amp;nbsp;getters and setters for these properties.&lt;/P&gt;&lt;P&gt;3.Pull the values from application.properties or any other property file you are using for your application.&lt;/P&gt;&lt;P&gt;4.For pulling the values in spring boot application I used @Value annotation .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.Below is how my process bpmn looks like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;serviceTask id="createMailTask" name="Create Mail Task"&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; activiti:type="mail" activiti:class="com.org.activiti.model.TestInjectedField"&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;extensionElements&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;activiti:field name="to"&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; expression="${testInjectedField.recipient}" /&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;/activiti:field&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;/extensionElements&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; &amp;lt;/serviceTask&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.Java Delegate Class&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;com.org.activiti.model&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;import org.activiti.engine.delegate.DelegateExecution;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;import org.activiti.engine.delegate.JavaDelegate;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;import org.springframework.beans.factory.annotation.Value;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;import org.springframework.stereotype.Component;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;@Component("testInjectedField")&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;public class TestInjectedField implements JavaDelegate {&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;@Value("${recipient}")&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; private String recipient;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;public String getRecipient() {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; return recipient;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;public void setRecipient(String recipient) {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; this.recipient = recipient;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;public void execute(DelegateExecution execution) throws Exception {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Thanks&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 20:50:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pass-values-to-activiti-bpmn-xml-file-from-spring-boot/m-p/19230#M8511</guid>
      <dc:creator>raghureddy</dc:creator>
      <dc:date>2018-03-23T20:50:50Z</dc:date>
    </item>
  </channel>
</rss>

