Hi Community,

I’m running multiple processes using subprocesses. In the business process, there’s an element where I can retrieve the values for the total processes, completed processes, and terminated processes. However, these values are always showing as 0, even though there are completed processes.

Is there something wrong with my configuration below?

 

element parameter


 

subprocessnotificationprocess logpush notif

Like 0

Like

1 comments

That works for me, but it does require not running the subprocesses in the background (which I can see from your screenshot that you're not)

Show all comments

I've used following article to create Business process to send push notifications:
https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/bpm-process-examples/set-up-push-notifications-for-mobile-users

Goal of Business process is to send Push notifications to mobile app about calendar Activities for Owners:

 

  1. Run every 15 minutes (don't know if we can use some Signals based on Activitiy Start time, so decided to run every 15 minutes and check for Activities within next 15 minutes, which is also fine for us)
  2. So next setting Start and End dates within next 15 minutes interval
  3. Then Read Activitiy records (collection)

     

  4. and then Send push notification
     

  5. Issue is than I cannot pass Recepient User, as Owner of activity is Contact, but User is expected

 

So looking for your help:
1) How to pass respective User for collection of records?

Owner is not available for selection

2) Is it possible to send to multiple users (dynamically defined Owner from Read Collection and static Manager defined manually in Business Process)?

3) How to pass Lead_Name (text) or Lead_Status (lookup) to "Push notification text", instead of Lead_ID? ( I know how to handle this with Read single first record, to Read Lead Data and filter by Lead ID, but don't know how to handle such cases for Collection of records)

 

Huge thanks,

Leo

Like 1

Like

4 comments
Best reply

As far as getting the user for each contact, you could do this by creating another process inbetween the two. Create a subprocess and add parameters for the columns you want to include in the push notification (subject, lead, start, and contact). In this subprocess, you would read System Administration Unit (user) for the contact passed, then pass the values including the user to the Send Push Notification subprocess. In the main process, you'd change things so after reading the activities for the time period as a collection, you'd pass each to this new subprocess, and it would read the user for the contact and call the subprocess to send the push notification.

Ryan

As far as getting the user for each contact, you could do this by creating another process inbetween the two. Create a subprocess and add parameters for the columns you want to include in the push notification (subject, lead, start, and contact). In this subprocess, you would read System Administration Unit (user) for the contact passed, then pass the values including the user to the Send Push Notification subprocess. In the main process, you'd change things so after reading the activities for the time period as a collection, you'd pass each to this new subprocess, and it would read the user for the contact and call the subprocess to send the push notification.

Ryan

it works, huge thanks!

Is it possible to pass 2 or more users to singe Push notification subprocess?

Or should I use similar approach and create a fork (AND) in business process to call Push notification subprocess in case I need to sent the same Push notification to 2 or more persons?

Leonid,

You'd have to call that subprocess twice, once for each user.

thanks!

Show all comments

Where can I get all details on allowed formula systax and possible functions allowed to use
For example I was working to extract month & year from date and it was not so easy to understand best function allowed in business process formulas windows.

Looking for more details in addition to what we can see here:
https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/bu…

Like 0

Like

1 comments
Best reply

Formulas are C#. Creatio does have a few built in functions that can be used in formulas, but for the most part, it's a better approach to just think of it as C#. For extracting the month and year from a date, you'd just use C# syntax for Year and Month. For example:

[#SomeDate#].Year

Ryan

Formulas are C#. Creatio does have a few built in functions that can be used in formulas, but for the most part, it's a better approach to just think of it as C#. For extracting the month and year from a date, you'd just use C# syntax for Year and Month. For example:

[#SomeDate#].Year

Ryan

Show all comments

Hi All, I am trying to create a simple business process to add a new record in my custom object (EMAIL KPI) as soon as a record is inserted in BulkEmailTarget (Response in Email) object. I have used signal (record added) in BulkEmailTarget (Response in Email) to create such a business process; but the process is not triggered when a new record is added to the BulkEmailTarget object. What am I missing here?Thank you

 

 

 

 

 

Like 0

Like

1 comments


Hello,

We have reviewed your request and identified the root cause of the issue: the records in the BulkEmailTarget table are being added bypassing the entity layer, which means the associated business process is not triggered.

At this point, we recommend reconsidering your business requirement and the way it is currently being implemented. 

Regards,
Orkhan

Show all comments

I'm working on an app where user uploads an image and presses a button to "analyze" it, this starts a process which should take the image, and pass it to my outside API for analysis. I'm having a problem at the first step of the process since the process doesn't seem to see that any image was uploaded. I don't know how to explain this better so I'll attach couple of screenshots of my app/process, feel free to ask.

Like 2

Like

3 comments

Any help would be appreciated. 

Still didn't find a solution.

Hello,

From what you've shared, it looks like the process isn't retrieving the uploaded image as expected. To help pinpoint the issue, here are a few steps to take:
1. Turn on tracing for the business process. This will show whether the record ID and file attachment are actually being passed to the process at runtime.

2. Make sure that the RecordId used in the “Process file” element is the same ID as the one associated with the uploaded attachment. If you're triggering the process manually, double-check that the correct record is selected or passed in.

3. In your “Process file” element, you've selected HomeSection as the object. Confirm that the attachment was uploaded to this exact object. If the file was uploaded to a different object (e.g. another section or lookup), you’ll need to change the source object in the element configuration accordingly.

4. You can directly query the SysFile table (or the relevant attachment table) and check if the uploaded file is tied to the expected record ID and object schema.

Show all comments

Hello mates !

I'm trying to create a script into a business process to check the SIRET (French Enterprise Number). But I'm having a basic problem: an identifier is expected when I try to compile on line 59

using System.Text.RegularExpressions;
 
string siretNumber = Get<String>("siret");
bool siretValide = Get<bool>("siretValide");
 
int ttlAddition = 0, cpt = 1;
 
string formatInput = Regex.Replace(siretNumber, "[^a-zA-Z0-9_]+", "", RegexOptions.Compiled);
string reverseCard = new string(formatInput.ToCharArray().Reverse().ToArray());
 
int[] arrDigits = Array.ConvertAll<string, int>(
    System.Text.RegularExpressions.Regex.Split(reverseCard.ToString(), @"(?!^)(?!$)"),
    str => int.Parse(str)
);
int[] arrMult = new int[arrDigits.Length];
 
// First Luhn step:
// Start with the last digit (on the right)
// and move to the left, doubling the value of all even-numbered digits
for (int i = 0; i < arrDigits.Length; i++)
{
    if (cpt == 1)
        arrMult[i] = arrDigits[i]; // the key is processed first, the number is not doubled 
    else
    {
        if (cpt % 2 == 0)
            arrMult[i] = 2 * arrDigits[i];
        else
            arrMult[i] = arrDigits[i];
    }
    cpt++;
}
 
// Add together all the digits of each number thus obtained.
// If digit > 10, then the digit to be added gives, for example: 18 = 1 + 8
for (int i = 0; i < arrMult.Length; i++)
{
    if ((int)arrMult[i] >= 10) // if number > 9 you have to break down the number, e.g. 18 gives: 1+8
    {
        int[] intList = Array.ConvertAll<string, int>(
            System.Text.RegularExpressions.Regex.Split(arrMult[i].ToString(), @"(?!^)(?!$)"),
            str => int.Parse(str)
        );
        for (int j = 0; j < intList.Count(); j++)
        {
            ttlAddition += (int)intList[j];
        }
    }
    else
        ttlAddition += (int)arrMult[i];
}
 
// if modulo by 10 of the addition is zero then our figure is valid 
if (ttlAddition % 10 == 0)
    Set<bool>("siretValide", true); // set the variable siretValide to true in Creatio 
else
    Set<bool>("siretValide", false);

Compilation error

In VS Code, by replacing the last lines: Set<bool>("siret Valide", true); with Console.WriteLine("Verification OK"); and Set<bool>("siret Valide", false); with Console.WriteLine("Verification KO"); the program works fine.

 

Like 0

Like

4 comments
Best reply

Hello,

 

You can add using statement in Usings section in Methods block Of BP like this:

Also here is the fixed example of your code without compilation errors:

 

string siretNumber = Get&lt;String&gt;("siret");
bool siretValide = Get&lt;bool&gt;("siretValide");
 
int ttlAddition = 0, cpt = 1;
 
string formatInput = Regex.Replace(siretNumber, "[^a-zA-Z0-9_]+", "", RegexOptions.Compiled);
var formatInputCharArray = formatInput.ToCharArray();
Array.Reverse(formatInputCharArray);
string reverseCard = new string(formatInputCharArray);
 
int[] arrDigits = Array.ConvertAll&lt;string, int&gt;(
   System.Text.RegularExpressions.Regex.Split(reverseCard.ToString(), @"(?!^)(?!$)"),
   str =&gt; int.Parse(str)
);
int[] arrMult = new int[arrDigits.Length];
 
// First Luhn step:
// Start with the last digit (on the right)
// and move to the left, doubling the value of all even-numbered digits
for (int i = 0; i &lt; arrDigits.Length; i++)
{
	if (cpt == 1)
		arrMult[i] = arrDigits[i]; // the key is processed first, the number is not doubled 
	else
	{
		if (cpt % 2 == 0)
			arrMult[i] = 2 * arrDigits[i];
		else
			arrMult[i] = arrDigits[i];
	}
	cpt++;
}
 
// Add together all the digits of each number thus obtained.
// If digit &gt; 10, then the digit to be added gives, for example: 18 = 1 + 8
for (int i = 0; i &lt; arrMult.Length; i++)
{
	if ((int)arrMult[i] &gt;= 10) // if number &gt; 9 you have to break down the number, e.g. 18 gives: 1+8
	{
		int[] intList = Array.ConvertAll&lt;string, int&gt;(
           System.Text.RegularExpressions.Regex.Split(arrMult[i].ToString(), @"(?!^)(?!$)"),
           str =&gt; int.Parse(str)
       );
		for (int j = 0; j &lt; intList.Length; j++)
		{
			ttlAddition += (int)intList[j];
		}
	}
	else
		ttlAddition += (int)arrMult[i];
}
 
// if modulo by 10 of the addition is zero then our figure is valid 
if (ttlAddition % 10 == 0)
	Set&lt;bool&gt;("siretValide", true); // set the variable siretValide to true in Creatio 
else
	Set&lt;bool&gt;("siretValide", false);
return true;

Also please make sure that "siret" and "siretValide" parameters have the values assigned before this Script Task is executed. 

 

Hello

In a task script, you're not allowed to add the using statements.
Also, the script must end with:
return true;

You can add the using statements at the Methods block in the BP.

Hope this helps!

Mohamed Ouederni,

Hello Mohamed,
Thank you for your help ! i m a newbie in C#.

So i followed your recommandations:

i removed the using System.Text.RegularExpressions; at the script beginning, because when i open the process source code there is allready a using System.Text

i added a return true at the end of the script.

and i added too System.Text.RegularExpressions on the formatInput string :

string formatInput = System.Text.RegularExpressions.Regex.Replace(siretNumber, "[^a-zA-Z0-9_]+", "", System.Text.RegularExpressions.RegexOptions.Compiled);

But now i have the following errors:
compilation error

Line 65 is :
string reverseCard = new string(formatInput.ToCharArray().Reverse().ToArray());
 

Hello,

 

You can add using statement in Usings section in Methods block Of BP like this:

Also here is the fixed example of your code without compilation errors:

 

string siretNumber = Get&lt;String&gt;("siret");
bool siretValide = Get&lt;bool&gt;("siretValide");
 
int ttlAddition = 0, cpt = 1;
 
string formatInput = Regex.Replace(siretNumber, "[^a-zA-Z0-9_]+", "", RegexOptions.Compiled);
var formatInputCharArray = formatInput.ToCharArray();
Array.Reverse(formatInputCharArray);
string reverseCard = new string(formatInputCharArray);
 
int[] arrDigits = Array.ConvertAll&lt;string, int&gt;(
   System.Text.RegularExpressions.Regex.Split(reverseCard.ToString(), @"(?!^)(?!$)"),
   str =&gt; int.Parse(str)
);
int[] arrMult = new int[arrDigits.Length];
 
// First Luhn step:
// Start with the last digit (on the right)
// and move to the left, doubling the value of all even-numbered digits
for (int i = 0; i &lt; arrDigits.Length; i++)
{
	if (cpt == 1)
		arrMult[i] = arrDigits[i]; // the key is processed first, the number is not doubled 
	else
	{
		if (cpt % 2 == 0)
			arrMult[i] = 2 * arrDigits[i];
		else
			arrMult[i] = arrDigits[i];
	}
	cpt++;
}
 
// Add together all the digits of each number thus obtained.
// If digit &gt; 10, then the digit to be added gives, for example: 18 = 1 + 8
for (int i = 0; i &lt; arrMult.Length; i++)
{
	if ((int)arrMult[i] &gt;= 10) // if number &gt; 9 you have to break down the number, e.g. 18 gives: 1+8
	{
		int[] intList = Array.ConvertAll&lt;string, int&gt;(
           System.Text.RegularExpressions.Regex.Split(arrMult[i].ToString(), @"(?!^)(?!$)"),
           str =&gt; int.Parse(str)
       );
		for (int j = 0; j &lt; intList.Length; j++)
		{
			ttlAddition += (int)intList[j];
		}
	}
	else
		ttlAddition += (int)arrMult[i];
}
 
// if modulo by 10 of the addition is zero then our figure is valid 
if (ttlAddition % 10 == 0)
	Set&lt;bool&gt;("siretValide", true); // set the variable siretValide to true in Creatio 
else
	Set&lt;bool&gt;("siretValide", false);
return true;

Also please make sure that "siret" and "siretValide" parameters have the values assigned before this Script Task is executed. 

 

Hello Iryna !
This fixed the two first errors.

compilation error

it looks like system can not find Count, so i added System.link to the method block of the BP and the process has been successfully compiled.

Thank you all for you help !

Show all comments

Hello,

I have some business processes that reads the files attached to a section using a "Process file" element to add them to a "send email" element.
If the "container" of the attachments is "an old one" (like CaseFile, AccountFile, etc.) it works fine.
If the "container" is the "Freedom UI SysFile" (Uploaded File) the "Process file" element always returns an empty collection of files (even removing all the filters).

How can I send an email from a Business Process and attach the files stored in "SysFile" entity?

Thanks

Like 0

Like

3 comments

Hi,

We've investigated this behavior, and unfortunately, the "Process File" element cannot be configured to work with SysFile in cases where a registered [Object]File schema exists for the object in the system.
Currently, this behavior cannot be modified using low-code or development approaches.

At the same time, this is not the expected behavior, and we are already working on fixing this issue as part of the product. For now, the only viable solution is to use [Object]File for your task.

If your goal is to build a universal process that sends emails with attachments from different entities, we recommend creating separate flows for each object. For example, if the entity is Case, use a flow where the "Process File" element is configured for CaseFile; if it's another object without a custom file storage, use SysFile, etc.

We've also raised the priority of the existing task, taking your user experience into account. This will help prioritize and speed up the resolution.

Thank you for your understanding!

Pavlo Sokil,

Thanks for your reply

In my tests the Process File element doesn't work with SysFile for new Freedom UI objects that don't have a registered [Object]File schema. The returned file collection is always empty.

Any suggestions?

Thanks

 

Massimiliano Mazzacurati,

Hi,

Understood, thank you for letting us know. We've analyzed the situation — currently, the process element doesn't work quite correctly with attachments stored in SysFile.

To resolve this, you’ll need to make a small change to the process metadata. Here's a brief guide on how to do it, using a test section (Test Section) as an example:

  1. In the Process File element, select "Uploaded file" (SysFile) as the object.

  2. Then, in the Advanced settings, you’ll see a parameter called "Source data object" (SourceDataEntitySchemaUId) — this is the object to which the attachments in SysFile are linked.
    You’ll need to manually change this in the metadata to the UId of the actual object you are working with.
  3. Open the process metadata and switch to Modifications package mode.

     

  4. Locate the parameter by its code: "SourceDataEntitySchemaUId", and replace its value with the UId of your desired object.

  5. You can find the UId in the system configuration by clicking the three-dot menu and choosing "Properties" — for example:

  6.  

  7. After that, in the process metadata, update the "GS2" value for this parameter and save the changes.

  8. Important: Reload the process page before making further changes in the designer to avoid overwriting the metadata update.
  9. Now you will notice the changes in parameter's settings in advanced mode:
     

That’s it — now the attachments will be linked correctly.

Please note that for now, this is a workaround. Our team is actively working to ensure the process element handles this case properly without needing to modify the metadata manually.

Hope this helps solve your business task.

Thanks for reaching out!

Show all comments

Hi, 

I’m using the "Handle Template for Email with Macros" user task, but the output still contains the original template with macros untouched. The macros are not being replaced with actual values, and the Body parameter is returning the same template content.

Can you help me understand why the macro fields are not being filled in?

Like 0

Like

1 comments

I Created my own User task which handle all macro which have macro source filled in.

protected override bool InternalExecute(ProcessExecutingContext context) {
			// IMPORTANT: When implementing long-running operations, it is crucial to
			// enable timely and responsive cancellation. To achieve this, ensure that your code is designed to
			// respond appropriately to cancellation requests using the context.CancellationToken mechanism.
			// For more detailed information and examples, please, refer to our documentation.
			if (TemplateCode == Guid.Empty || RecordId == Guid.Empty) {
				isSuccess = false; 
				return true;
			}
 
			var templateEsq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "EmailTemplate");
			var bodyColumn = templateEsq.AddColumn("Body");
			var macroColumn = templateEsq.AddColumn("Object");
			var templateEntity = templateEsq.GetEntity(UserConnection, TemplateCode);
 
			if (templateEntity == null) {
				isSuccess = false;
				return true;
			}
 
			Guid macroSource = templateEntity.GetTypedColumnValue&lt;Guid&gt;("ObjectId");
			string body = templateEntity.GetColumnValue(bodyColumn.Name)?.ToString() ?? "";
 
 
			var macroSourceEsq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "SysSchema");
			var idFilter = macroSourceEsq.CreateFilterWithParameters(FilterComparisonType.Equal, "UId", macroSource);
			macroSourceEsq.Filters.Add(idFilter);
			var schemaNameColumn = macroSourceEsq.AddColumn("Name");
			var macroSourceEntities = macroSourceEsq.GetEntityCollection(UserConnection);
 
			if (macroSourceEntities == null || macroSourceEntities.Count == 0) {
				isSuccess = false;
				return true;
			}
 
			string schemaName = macroSourceEntities[0].GetColumnValue(schemaNameColumn.Name)?.ToString() ?? "";
 
			var macroRegex = new Regex(@"\[#(.*?)#\]");
			var matches = macroRegex.Matches(body);
 
			if (matches.Count == 0) {
				ReturnBody = body;
				isSuccess = false; 
				return true;
			}
 
			var esq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, schemaName);
			var columnMap = new Dictionary&lt;string, string&gt;(); 
 
			foreach (Match match in matches) {
				var macro = match.Groups[1].Value;
				if (!columnMap.ContainsKey(macro)) {
					var column = esq.AddColumn(macro);
					columnMap[macro] = column.Name;
				}
			}
 
			var entity = esq.GetEntity(UserConnection, RecordId);
			if (entity == null) {
				ReturnBody = body;
				isSuccess = false;
				return true;
			}
 
			var result = body;
			foreach (Match match in matches) {
				var macro = match.Groups[1].Value;
				if (columnMap.TryGetValue(macro, out string esqColumnName)) {
					try {
						var value = entity.GetColumnValue(esqColumnName)?.ToString() ?? "";
						result = result.Replace(match.Value, value);
					} catch (Terrasoft.Common.ItemNotFoundException) {
						try {
							var value = entity.GetColumnValue(esqColumnName + "Id")?.ToString() ?? "";
							result = result.Replace(match.Value, value);
						} catch {
							result = result.Replace(match.Value, "");
						}
					}
				}
			}
 
			ReturnBody = result;
			isSuccess = true;
			return true;
		}
Show all comments

Hi everyone,
I'm new to Creatio and currently working with business processes. I’ve built a process that should display a pre-configured page when the quote total exceeds the customer’s budget.

The process is triggered when the quote total is modified. It uses two Read Data elements to retrieve the quote total and the customer's budget, followed by a gateway that checks if the total > budget. If true, it proceeds to a "Show Page" element.

I’ve enabled the Show page automatically checkbox, but the page doesn’t appear when the condition is met. Is there anything else I need to configure for the page to show automatically?

Any help is appreciated—thanks!

Like 0

Like

2 comments

Check the start of the process (the green circle) and make sure the “run in background” is NOT checked. 
Ryan 

Ryan Farley,

So I checked my object signal (green circle) and the Run following elements in the background field is unchecked. This checkbox is also unchecked for the pre-configured page element. 

Show all comments

i am using creatio 8.2.2

 

i am currently making a way so that if 1 field's value is under 50m then the top flow works, if between 50m and 150m then the middle flow works and if over 150m then the bottom flow works i am building a business process, now am a bit confused, is this how you do it?

 

or do i have to use the exclusive gateway for the if field conditional flows?

Like 1

Like

1 comments

I think an exclusive OR gateway would be optimal in that it would only test conditions until the first true condition, whereas an (inclusive) OR gateway would test all conditions.  Your process would work fine however I would think except I'm not sure the final approval in each case would exit the approval, you may have to provide conditional exits (but I could be wrong).

Show all comments