<?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: Custom Data Model - is there a possibility to connect to the mysql db by a script task (js) in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/custom-data-model-is-there-a-possibility-to-connect-to-the-mysql/m-p/26183#M11334</link>
    <description>&lt;P&gt;Have you tried a service task instead? I'm trying to do some research on this for you.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Dec 2019 19:17:40 GMT</pubDate>
    <dc:creator>jljwoznica</dc:creator>
    <dc:date>2019-12-23T19:17:40Z</dc:date>
    <item>
      <title>Custom Data Model - is there a possibility to connect to the mysql db by a script task (js)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-data-model-is-there-a-possibility-to-connect-to-the-mysql/m-p/26182#M11333</link>
      <description>&lt;P&gt;Hi together!&lt;/P&gt;&lt;P&gt;I'm trying to get a connection to mysql db by a script task (javascript). Is there any possibility?&lt;/P&gt;&lt;P&gt;My problem with the store entity task is that it is a way too unflexible. I need more dynamic functionality in my process because I have more user tasks with different form und fields. The dynamic dream will be that I have only one script task where I can update all of my variables.&lt;/P&gt;&lt;P&gt;I tried it on this way: (but it says an error -- require not found! Is it because activiti doesn't support node.js?)&lt;/P&gt;&lt;P&gt;&lt;SPAN class="jskeywordcolor"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;mysql = require(&lt;/SPAN&gt;&lt;SPAN class="jsstringcolor"&gt;'mysql'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="jskeywordcolor"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;con = mysql.&lt;/SPAN&gt;&lt;SPAN class="jspropertycolor"&gt;createConnection&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;host:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jsstringcolor"&gt;"localhost"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; user:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jsstringcolor"&gt;"&lt;EM&gt;yourusername&lt;/EM&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; password:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jsstringcolor"&gt;"&lt;EM&gt;yourpassword&lt;/EM&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; database:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jsstringcolor"&gt;"mydb"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;con.&lt;/SPAN&gt;&lt;SPAN class="jspropertycolor"&gt;connect&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class="jskeywordcolor"&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;(err) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jskeywordcolor"&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(err)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jskeywordcolor"&gt;throw&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;err;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; console.&lt;/SPAN&gt;&lt;SPAN class="jspropertycolor"&gt;log&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class="jsstringcolor"&gt;"Connected!"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jskeywordcolor"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;sql =&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jsstringcolor"&gt;"INSERT INTO customers (name, address) VALUES ('Company Inc', 'Highway 37')"&lt;/SPAN&gt;;&lt;BR /&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;con.&lt;/SPAN&gt;&lt;SPAN class="jspropertycolor"&gt;query&lt;/SPAN&gt;&lt;SPAN&gt;(sql,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jskeywordcolor"&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(err, result) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jskeywordcolor"&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(err)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="jskeywordcolor"&gt;throw&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;err;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; });&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there any way to use the data models like this? Otherwise the data models in activiti is not really usable for my complex processes...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot for your informations!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regard,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Patrick&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 09:38:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-data-model-is-there-a-possibility-to-connect-to-the-mysql/m-p/26182#M11333</guid>
      <dc:creator>patrickeixner</dc:creator>
      <dc:date>2019-12-18T09:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Data Model - is there a possibility to connect to the mysql db by a script task (js)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-data-model-is-there-a-possibility-to-connect-to-the-mysql/m-p/26183#M11334</link>
      <description>&lt;P&gt;Have you tried a service task instead? I'm trying to do some research on this for you.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2019 19:17:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-data-model-is-there-a-possibility-to-connect-to-the-mysql/m-p/26183#M11334</guid>
      <dc:creator>jljwoznica</dc:creator>
      <dc:date>2019-12-23T19:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Data Model - is there a possibility to connect to the mysql db by a script task (js)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-data-model-is-there-a-possibility-to-connect-to-the-mysql/m-p/26184#M11335</link>
      <description>&lt;P&gt;Hi jljwoznica,&lt;/P&gt;&lt;P&gt;thanks for your answer. I will give it a try with the service task.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 07:16:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-data-model-is-there-a-possibility-to-connect-to-the-mysql/m-p/26184#M11335</guid>
      <dc:creator>patrickeixner</dc:creator>
      <dc:date>2020-01-09T07:16:05Z</dc:date>
    </item>
  </channel>
</rss>

