<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/discussions/f/process/3673/is-there-a-way-to-get-the-process-model-id-from-its-uuid</link><description>Is there a way to get the process model ID from its UUID?... OriginalPostID-127577 OriginalPostID-127577</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/140731?ContentTypeID=1</link><pubDate>Tue, 17 Sep 2024 23:50:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:04fadcbc-3ae3-420b-a08b-05f1a54119a7</guid><dc:creator>Jason Ruvinsky</dc:creator><description>&lt;p&gt;Our use case is special because we have one shared development environment, but two separate production environments that house different applications. The constant was part of a common object (LDAP Sync post sync processes) that goes to both environments, but needed to call different processes depending on which production environment it lived on. I had to create multiple versions of this application, with the settings for each target environment. I renamed the app for each&amp;nbsp;with the environment name in it, so it is easy to tell them apart. When making changes, I need to import into dev each, make the changes to the process model constants (and other changes that have dependencies on different apps), and then export again / re-import the dev version. This is all very closely tied to our setup and use case, however, and may not apply to you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/140704?ContentTypeID=1</link><pubDate>Tue, 17 Sep 2024 14:56:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e167f4a2-87d4-4712-b20b-4f992435b496</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The comment you&amp;#39;re replying to is over 7 years old now. I don&amp;#39;t have access to the same version of that rule anymore, as I originally wrote it several projects ago at least.&lt;/p&gt;
&lt;p&gt;I have a modern iteration of the same essential rule and in it, instead of bending over backwards to iterate across potential different-language process model name versions, I merely extract the english one directly.&amp;nbsp; (The rule you were asking about probably takes an array of name/value pairs and returns them in a better fashion, given that we didn&amp;#39;t even have a!forEach() yet when this old version was written).&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s my new version with no precedents, just for the sake of anyone who might find this thread in the future.&amp;nbsp; Note that I&amp;#39;ve upgraded it to make use of the updated Content Tools plug-in, and to consume either PM ID or PM UUID (the plugin function can use either).&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!initialResult: getprocessmodeldetailsbyuuid(
    processModelUUIDOrId: a!defaultValue(
      value: ri!pmId,
      default: a!defaultValue(
        value: ri!pmUuid,
        default: null()
      )
    )
  ),

  local!foundPmId: index(extract(local!initialResult, &amp;quot; Id:&amp;quot;, &amp;quot;, UUID:&amp;quot;), 1, null()),

  if(
    a!isNotNullOrEmpty(local!foundPmId),
    a!map(
      pmId: local!foundPmId,
      uuid: index(extract( local!initialResult, &amp;quot;UUID:&amp;quot;, &amp;quot;, Creator:&amp;quot; ), 1, null()),
      name: index(extract( local!initialResult, &amp;quot;Name: [en_US=&amp;quot;, &amp;quot;], Id:&amp;quot; ), 1, null()),
      folderName: index(extract( local!initialResult, &amp;quot;Parent: &amp;quot;, &amp;quot;, Parent Id:&amp;quot; ), 1, null()),
      folderId: tointeger(index(extract( local!initialResult, &amp;quot;Parent Id: &amp;quot;, &amp;quot;, Location:&amp;quot; ), 1, null())),
      createdBy: index(extract( local!initialResult, &amp;quot;Creator: &amp;quot;, &amp;quot;, Last Modified&amp;quot; ), 1, null()),
      createdOn: todatetime( index(extract( local!initialResult, &amp;quot;Created on: &amp;quot;, &amp;quot;, Last Modified on:&amp;quot; ), 1, null())),
      modifiedBy: index(extract( local!initialResult, &amp;quot;Last Modified by: &amp;quot;, &amp;quot;, Parent:&amp;quot; ), 1, null()),
      modifiedOn: todatetime( index(extract( local!initialResult, &amp;quot;Last Modified on: &amp;quot;, &amp;quot;, Number&amp;quot; ), 1, null()) ),
      path: index(extract(local!initialResult, &amp;quot;Location: &amp;quot;, &amp;quot;, IsPublic&amp;quot; ), 1, null()),
      version: tointeger(index(extract( local!initialResult &amp;amp; &amp;quot;|END&amp;quot;, &amp;quot;Number of Versions: &amp;quot;, &amp;quot;|END&amp;quot; ), 1, null()))
    ),
    
    a!map(
      result: &amp;quot;No Process Model Found&amp;quot;
    )
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Example output when fed a valid PM ID or UUID:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/14/pastedimage1726585225865v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/140683?ContentTypeID=1</link><pubDate>Tue, 17 Sep 2024 09:45:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce4a60f3-4f38-4cc5-b3c9-8efbb906aa24</guid><dc:creator>Stefan Helzle</dc:creator><description>[quote userid="50400" url="~/discussions/f/process/3673/is-there-a-way-to-get-the-process-model-id-from-its-uuid/46043"]Any reason you don&amp;amp;#x27;t create constants of type &amp;quot;Process Model&amp;quot;, which are fine being exported/imported to different environments and can be used directly in the smart service?[/quote]
&lt;p&gt;I think this is still a valid question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/140682?ContentTypeID=1</link><pubDate>Tue, 17 Sep 2024 09:43:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c8cda737-1112-42e4-9bbb-e110d9bb5bd9</guid><dc:creator>yashig2399</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/mikes0011"&gt;Mike Schmitt&lt;/a&gt;&amp;nbsp;, what&amp;#39;s the&amp;nbsp;rule!GLBL_returnLanguageNamePair?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/140680?ContentTypeID=1</link><pubDate>Tue, 17 Sep 2024 09:40:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:42a17eb1-c95f-419e-81d8-cf79339c279d</guid><dc:creator>yashig2399</dc:creator><description>&lt;p&gt;Hi &amp;nbsp;. I have to implement the same. can you let me know what approach have you choose?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/46084?ContentTypeID=1</link><pubDate>Mon, 12 Jun 2017 19:49:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:20e21577-8322-4758-b039-d0cec9e6bc3d</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I agree with your critique regarding the data returned by the plugin expression, and for that reason I&amp;#39;ve already written an expression rule in the past that does the needed parsing and passes back a dictionary. I can post it tomorrow if you need, as I&amp;#39;m travelling today.&lt;/p&gt;
&lt;p&gt;Edit: I&amp;#39;m back today, so here&amp;#39;s the expression rule I mentioned in case anyone would like to use it.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="jsp"&gt;=/*  GLBL_processModelDetailsByUUID  */

with(
  local!rawText: if(
    rule!APN_isBlank(ri!uuid),
    &amp;quot; &amp;quot;,
    getprocessmodeldetailsbyuuid(ri!uuid)
  ),

  local!type: extract(local!rawText, &amp;quot;Type:&amp;quot;, &amp;quot;,&amp;quot; ),
  local!nameList: trim( split( extract( rawText, &amp;quot;Name: [&amp;quot;, &amp;quot;]&amp;quot; ), &amp;quot;,&amp;quot; )),
  local!nameArray: apply( rule!GLBL_returnLanguageNamePair, local!nameList ),
  local!id: extract( local!rawText, &amp;quot;Id:&amp;quot;, &amp;quot;, UUID&amp;quot; ),
  local!uuid: extract( local!rawText, &amp;quot;UUID:&amp;quot;, &amp;quot;, Creator&amp;quot; ),
  local!creator: extract( local!rawText, &amp;quot;Creator: &amp;quot;, &amp;quot;, Last&amp;quot; ),
  local!lastModifiedBy: extract( local!rawText, &amp;quot;Last Modified by: &amp;quot;, &amp;quot;, Parent&amp;quot;),
  local!parent: extract( local!rawText, &amp;quot;Parent: &amp;quot;, &amp;quot;, Parent Id:&amp;quot; ),
  local!parentId: tointeger( extract( local!rawText, &amp;quot;Parent Id: &amp;quot;, &amp;quot;,&amp;quot; )),
  local!location: extract( local!rawText, &amp;quot;Location: &amp;quot;, &amp;quot;, Is&amp;quot; ),
  local!isPublic: extract( local!rawText, &amp;quot;IsPublic: &amp;quot;, &amp;quot;, Created&amp;quot; ) = &amp;quot;true&amp;quot;,
  
  /* note: for the latest versions of the content details by uuid plugin, 
    the following lines can have the expression rule call replaced with 
    a simple &amp;quot;todatetime()&amp;quot; function, as the plugin was upgraded to 
    return a more standard datetime string after this handler rule was
    originally written. */
  local!createdOn: rule!GLBL_dateTimeStringToDatetime(extract( local!rawText, &amp;quot;Created on: &amp;quot;, &amp;quot;, Last&amp;quot; )),
  local!lastModifiedOn: rule!GLBL_dateTimeStringToDatetime(extract( local!rawText &amp;amp; &amp;quot;END&amp;quot;, &amp;quot;Last Modified on: &amp;quot;, &amp;quot;END&amp;quot; )),
  
  {
    type: local!type,
    primaryName: property(index(local!nameArray, 1, &amp;quot;&amp;quot;), &amp;quot;name&amp;quot;, &amp;quot;&amp;quot;),
    nameArray: local!nameArray,
    id: local!id,
    uuid: local!uuid,
    creator: local!creator,
    lastModifiedBy: local!lastModifiedBy,
    parent: local!parent,
    parentId: local!parentId,
    location: local!location,
    isPublic: local!isPublic,
    createdOn: local!createdOn,
    lastModifiedOn: local!lastModifiedOn
  }
)

/* developed by: Mike Schmitt */&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/46080?ContentTypeID=1</link><pubDate>Mon, 12 Jun 2017 18:34:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:72200367-3aed-44d6-a33a-0541a1a8ea52</guid><dc:creator>Jason Ruvinsky</dc:creator><description>Mike, using the Process Model Details by UUID plugin function would work, but since the data is returned in a formatted string, rather than in a dictionary, I&amp;#39;d need to extract the ID from it using string parsing. This seems like a really round-about and potentially error prone method of obtaining the ID. I could look into writing a simple plugin that gets it, if one doesn&amp;#39;t already exist.&lt;br /&gt;
&lt;br /&gt;
Also, I tested the Start Process Node with an integer ID, and that does work for calling the matching process with that ID.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/46071?ContentTypeID=1</link><pubDate>Mon, 12 Jun 2017 13:54:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:93159eed-cae3-4122-b309-6427fff7d571</guid><dc:creator>Mike Schmitt</dc:creator><description>In that case then, I think you just need to use the process model details by uuid plugin function to get the pmid at call time - would this work within the configuration of the start process node?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/46068?ContentTypeID=1</link><pubDate>Mon, 12 Jun 2017 13:30:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4434b10e-951c-48aa-b9e2-d16df9b771c4</guid><dc:creator>Jason Ruvinsky</dc:creator><description>In my particular use case, we cannot use constants of type process model, because the process models referred to in the constant won&amp;#39;t exist on every environment, so the import would fail.&lt;br /&gt;
&lt;br /&gt;
Some background:&lt;br /&gt;
We have a single development environment, but two production environments - one that is internal to our network, and one that is exposed externally. Each is used for multiple Appian applications, and will host apps based on whether they need to be internal or external. I am setting up an LDAP Sync application that will live on BOTH servers, but many of our apps will need to do some additional processing on their users after the sync completes, so I want to call several process models dynamically using the &amp;quot;Start Process Model&amp;quot; smart service.&lt;br /&gt;
&lt;br /&gt;
If it were possible to mark non-primitive constants as &amp;quot;environmental&amp;quot; constants, this would work. Since they can&amp;#39;t be, I need to use IDs and make those environmental constants - but IDs don&amp;#39;t exist before the first import. It would be much cleaner to store the UUIDs and instead make an environmental constant that specifies which set of UUIDs to use - if there were a clean way to get the ID from the UUID, or a way to run the process from the UUID instead.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/46048?ContentTypeID=1</link><pubDate>Mon, 12 Jun 2017 06:13:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:811c6152-3750-498a-8001-ebb00140161e</guid><dc:creator>harshav</dc:creator><description>I think what Eduardo suggested is correct and also I we can use the constant calling, but I do not think the constant of type process model can be created in &amp;lt;7.0 and below. for that you can use the reporting or the plugin concept and at the later versions you can directly use the PM constant and can use tointeger(cons!PM) will give you the PMID&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/46047?ContentTypeID=1</link><pubDate>Mon, 12 Jun 2017 05:46:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b588b7cf-3882-4ec8-924c-d1370ba52c17</guid><dc:creator>chandu</dc:creator><description>&lt;p&gt;Hi jasonr411, As suggested above by Mike we are using Constant of type process model and its working fine. Did you face any specific issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/46043?ContentTypeID=1</link><pubDate>Fri, 09 Jun 2017 15:57:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:00441400-1990-4dfe-b09b-f264b7435503</guid><dc:creator>Mike Schmitt</dc:creator><description>Any reason you don&amp;amp;#x27;t create constants of type &amp;quot;Process Model&amp;quot;, which are fine being exported/imported to different environments and can be used directly in the smart service?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...</title><link>https://community.appian.com/thread/46014?ContentTypeID=1</link><pubDate>Thu, 08 Jun 2017 21:30:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:de427bc1-246e-45bc-a825-432049a555de</guid><dc:creator>Jason Ruvinsky</dc:creator><description>Is there a way to use the UUID with the &amp;quot;Start Process Model&amp;quot; smart service in 17.1? I can use the ID to start the process, but I&amp;amp;#x27;d rather use UUID, since ID differs per environment. (I want to set up constants to point to the processes that will be started, which differ per environment. Unfortunately, environmental constants can only be used on primitive types - hence my preference for using UUID over ID, since I can&amp;amp;#x27;t use a Process Model type for this constant.)&lt;br /&gt;
&lt;br /&gt;
getprocessmodeldetailsbyuuid returns a string that would need to be parsed to get the ID, which is not ideal. A more direct function to get just the ID would be best, or something that returns it in a dictionary instead of a string.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...&lt;p style='display:no</title><link>https://community.appian.com/thread/12889?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2014 11:50:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:50b4a373-24db-471e-8afd-5f3759d47cd3</guid><dc:creator>chetany</dc:creator><description>Thank you Eduardo, the getProcessModelDetailsByUuid() works like a charm!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...&lt;p style='display:no</title><link>https://community.appian.com/thread/12888?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2014 11:35:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6fe67b70-9bb7-4fd6-83b6-589507b47fe5</guid><dc:creator>Eduardo Fuentes</dc:creator><description>The plugin should work on &amp;lt;7.0 too&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...&lt;p style='display:no</title><link>https://community.appian.com/thread/12887?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2014 11:31:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fe079c22-470a-4e68-b7e4-87a4e8525cf9</guid><dc:creator>chetany</dc:creator><description>Thank you Eduardo. I will use the second option since our environment version is &amp;lt; 7.0&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...&lt;p style='display:no</title><link>https://community.appian.com/thread/12885?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2014 11:08:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:46b2ec65-55b6-4054-98d0-8642f9a4fa79</guid><dc:creator>Eduardo Fuentes</dc:creator><description>Two options:&lt;br /&gt;&lt;br /&gt;1. Content Details by UUID Plug-in &lt;a href="https://forum.appian.com/suite/tempo/records/type/components/item/i4BWsQdLlzKy55h8z8zJ0sPqpDWFrba9ry_HEcQwZo8zbOvJLVMf5NGpZPe_l48/view/summary"&gt;forum.appian.com/.../summary&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. All Process Models Report adding a column defined as pm!uuid and one as pm!id then filter to show the models you need&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to get the process model ID from its UUID?...&lt;p style='display:no</title><link>https://community.appian.com/thread/12884?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2014 10:47:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:15a3a38d-99dd-4c82-9765-f914ff361619</guid><dc:creator>chetany</dc:creator><description>Ideally, I need to get all the process models IDS of all the process models in an application.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>