<?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: rules &amp; workflows on the content of the document in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224786#M177916</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ah, it sounds like the data you care making your decision on is embedded in the document. If those documents are in a standard format, maybe you can use a metadata extracter to grab the data out of the document and put it in a property. If the documents aren't in a standard format, parsing them might get difficult/expensive.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you don't want to extract the metadata, you can just parse the value from within the jBPM decision node. Decisions can be implemented with Java code so that means decisions can be made based on anything you can do with Java, whether that's parse a complex binary file format, make calls to external systems, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Nov 2009 16:42:49 GMT</pubDate>
    <dc:creator>jpotts</dc:creator>
    <dc:date>2009-11-05T16:42:49Z</dc:date>
    <item>
      <title>rules &amp; workflows on the content of the document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224781#M177911</link>
      <description>HI;how we can execute a workflow or rules on a file based on the text (content) of this document?thx 4 ur F1 &lt;IMG id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;</description>
      <pubDate>Tue, 27 Oct 2009 14:24:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224781#M177911</guid>
      <dc:creator>notherien</dc:creator>
      <dc:date>2009-10-27T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: rules &amp; workflows on the content of the document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224782#M177912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here are a couple of options. There may be others…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There isn't an OOTB rule condition that looks in the content to decide whether or not to apply a rule. So, option 1 is you could write your own condition handler that does. If you look at web-client-config.xml you'll see where Alfresco keeps track of its OOTB condition handlers and their associated Java classes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;condition-handlers&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;handler name="compare-mime-type" class="org.alfresco.web.bean.rules.handlers.CompareMimeTypeHandler" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;handler name="compare-property-value" class="org.alfresco.web.bean.rules.handlers.PropertyValueHandler" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;handler name="has-aspect" class="org.alfresco.web.bean.rules.handlers.HasAspectHandler" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;handler name="in-category" class="org.alfresco.web.bean.rules.handlers.InCategoryHandler" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;handler name="is-subtype" class="org.alfresco.web.bean.rules.handlers.IsSubTypeHandler" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;handler name="composite-condition" class="org.alfresco.web.bean.rules.handlers.CompositeConditionHandler" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;handler name="compare-date-property" class="org.alfresco.web.bean.rules.handlers.property.DatePropertyValueConditionHandler" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;handler name="compare-integer-property" class="org.alfresco.web.bean.rules.handlers.property.IntegerPropertyValueConditionHandler" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;handler name="compare-text-property" class="org.alfresco.web.bean.rules.handlers.property.TextPropertyValueConditionHandler" /&amp;gt;&lt;BR /&gt;&amp;lt;/condition-handlers&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use one of those classes as an example, write your own handler, then extend Alfresco's config to add yours to the list. Then set up your rule to use your new condition and have that rule do whatever action you need (start a workflow, run some action, execute a script, or whatever).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Option 2 is you can configure a rule to launch an advanced workflow (you do this by using the Execute Script action and point to server-side JavaScript that launches the desired workflow) and then have the first step in the workflow use JavaScript or Java to check the content and then proceed through the workflow appropriately based on what's there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some things (there are probably more) to think about when deciding between the two:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - Rule conditions get fired when anything is added to the folder, regardless of the client that put them there. This means that class better execute fast or your performance across the entire platform will suffer when adding docs to the repo. If you've got inefficient code or large bodies of content to inspect, avoid the condition handler option.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - Rule condition would be a more flexible/configurable route because your condition handler could let the person creating the rule specify what's being searched for. So if you need to do this in a lot of different folders with different search patterns, and you want end users to be able to config, you might like the condition handler approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - The workflow route is good if you are almost always going to be kicking off a workflow anyway. It's tougher to configure though, and if you are adding a lot of content, you're going to be generating a lot of workflows, potentially unnecessarily.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2009 22:21:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224782#M177912</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2009-10-30T22:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: rules &amp; workflows on the content of the document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224783#M177913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks&amp;nbsp; jpotts for the reply,me what I seek is how I can run a workflow X1 on delivery with the total exceeds 100$ and a workflow X2 on the delivery of which the total is between 50$ and 100 $…for exemple&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 16:23:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224783#M177913</guid>
      <dc:creator>notherien</dc:creator>
      <dc:date>2009-11-02T16:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: rules &amp; workflows on the content of the document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224784#M177914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Use two process nodes and a decision. So you'd have a decision node that would inspect the total on the metadata of the object in the workflow. You can get to that easily from the bpm_package.children object. The decision node would choose between two transitions depending on the value. If transition_X1 is taken, it leads to a process node that runs your X1 workflow. (A process node is a node that runs another deployed workflow as a sub-process). If transition_X1 is taken, it leads to a process node that runs your X2 workflow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 23:12:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224784#M177914</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2009-11-04T23:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: rules &amp; workflows on the content of the document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224785#M177915</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;SPAN&gt;thank you, this is a very good idea, but my problem is that the total does not is a metadata but it is in a table in the delivery&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;notherien&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 08:35:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224785#M177915</guid>
      <dc:creator>notherien</dc:creator>
      <dc:date>2009-11-05T08:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: rules &amp; workflows on the content of the document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224786#M177916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ah, it sounds like the data you care making your decision on is embedded in the document. If those documents are in a standard format, maybe you can use a metadata extracter to grab the data out of the document and put it in a property. If the documents aren't in a standard format, parsing them might get difficult/expensive.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you don't want to extract the metadata, you can just parse the value from within the jBPM decision node. Decisions can be implemented with Java code so that means decisions can be made based on anything you can do with Java, whether that's parse a complex binary file format, make calls to external systems, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 16:42:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rules-workflows-on-the-content-of-the-document/m-p/224786#M177916</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2009-11-05T16:42:49Z</dc:date>
    </item>
  </channel>
</rss>

