<?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 The best way to get data from Mysql DB in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202935#M156065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to create a custom vacation request process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In my project i have to add somme users in the activiti Mysql DB (i add them in act_user_id), and i create two other tables calls service (this table contains ids, names of services and manager_name) and&amp;nbsp; a table relationship (id_user and id_serivce) contains foreign key of id_service and ID_ (id of table act_user_id).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So in my process, when a user log on in activiti-explorer, he'll fill and validate the form, if this current user is manager his request will be sent directly to RH manager, else, if the current user is sample employee his request will be send to his manager to validate it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My questions are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) am i right to create ohter users and tables in activiti DB?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) How can i get the current user ( should i use serivceTask and implemsts a java code and sql queries or other there is other choice)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) To store the result of this java class should i use resultVariable ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) at last, how can i do the unit test for this ServiceTask to test if i get the true result?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;please help for any thing suggestion, links or examples &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jun 2014 16:44:07 GMT</pubDate>
    <dc:creator>bargan</dc:creator>
    <dc:date>2014-06-25T16:44:07Z</dc:date>
    <item>
      <title>The best way to get data from Mysql DB</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202935#M156065</link>
      <description>Hi all,I want to create a custom vacation request process.In my project i have to add somme users in the activiti Mysql DB (i add them in act_user_id), and i create two other tables calls service (this table contains ids, names of services and manager_name) and&amp;nbsp; a table relationship (id_user and id_</description>
      <pubDate>Wed, 25 Jun 2014 16:44:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202935#M156065</guid>
      <dc:creator>bargan</dc:creator>
      <dc:date>2014-06-25T16:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to get data from Mysql DB</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202936#M156066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;1) am i right to create ohter users and tables in activiti DB?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;It is possible. On the other hand engine upgrade can be more difficult.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Another possibility is to use expression to get user's manager.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;2) How can i get the current user ( should i use serivceTask and implemsts a java code and sql queries or other there is other choice)?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;You can use authenticatedUserId in expressions&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.activiti.org/userguide/#apiExpressions" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/userguide/#apiExpressions&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;3) To store the result of this java class should i use resultVariable ?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;If the class implements JavaDelegate interface you can create/update any process variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;4) at last, how can i do the unit test for this ServiceTask to test if i get the true result?&lt;/BLOCKQUOTE&gt;&lt;A href="http://www.activiti.org/userguide/#apiUnitTesting" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/userguide/#apiUnitTesting&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2014 06:28:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202936#M156066</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-06-26T06:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to get data from Mysql DB</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202937#M156067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For the first question, can you please give me an example for how using expressions to get the user's manager.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2014 09:35:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202937#M156067</guid>
      <dc:creator>bargan</dc:creator>
      <dc:date>2014-06-26T09:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to get data from Mysql DB</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202938#M156068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example you can use beans in expressions to get result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.activiti.org/userguide/#exposingConfigurationBeans" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/userguide/#exposingConfigurationBeans&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.activiti.org/userguide/#N10A60" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/userguide/#N10A60&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 06:52:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202938#M156068</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-06-27T06:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to get data from Mysql DB</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202939#M156069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your response. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry i have an other question: When i try to test my activiti projetc i get this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;""couldn't check if tables are already present using metadata.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#Error getting a new connection. Cause: java.sql.ESQLException: No suitable driver found for jdbc.mysql://localhost:3306/activiti"".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All Jars are on the projct ( jdbc.mysql, … etc) , also pom.xml and activiti.cfg.xml are configured.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 10:14:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202939#M156069</guid>
      <dc:creator>bargan</dc:creator>
      <dc:date>2014-06-27T10:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to get data from Mysql DB</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202940#M156070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;oh i resolved it,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In act.cfg.xml, i made an error "jdbc.mysql://localhost:3306/activiti",&amp;nbsp; replaced it by "jdbc:mysql://localhost:3306/activiti"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 16:08:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202940#M156070</guid>
      <dc:creator>bargan</dc:creator>
      <dc:date>2014-06-27T16:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: The best way to get data from Mysql DB</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202941#M156071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;oh i resolved it,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In act.cfg.xml, i made an error "jdbc.mysql://localhost:3306/activiti",&amp;nbsp; replaced it by "jdbc:mysql://localhost:3306/activiti"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 16:15:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/the-best-way-to-get-data-from-mysql-db/m-p/202941#M156071</guid>
      <dc:creator>bargan</dc:creator>
      <dc:date>2014-06-27T16:15:22Z</dc:date>
    </item>
  </channel>
</rss>

