Example 

Create the following business process: display a notification in the notification panel to an employee that was added to the list of participants in an activity. 

 

Business process diagram elements: 

  1. Incoming signal that adds an activity participant: when a new participant is added to the activity, activate the signal and start the business process. 
  2. Add data: create a notification in the "Notification" object to the participant. 

     

To do this: 

  1. Place the Signal element of the Initial events group on the diagram and call it "Participant added". Activate the element when a contact is added to the Participants expanded list of an activity. 
  2. Set up the signal parameters (Fig. 1): 
  3. Set "Activity participant" in the Object parameter. 
  4. Select "Record added" in the Which event should trigger the signal parameter. 
  5. Set "Participant = current contact" in the The added record must meet filter conditions area. 

Fig. 1 Signal element 

Fig. 1 Signal element 

  1. Place an Add data element of the System actions group between the Signal and Terminate elements and call it "Add notification." 
  2. Set up the element parameters (Fig. 2): 
  3. Select "Notification" in the Which object to add data to? parameter. 
  4. Select "One record" in the What is the data adding mode? parameter. 
  5. ClickAdd field in the Which column values to set? parameter. This opens a window. 
  6. Select "Created by," "IsRead," "NotificationType," "Object," "Source," "Time," "Title," "To," and "Unique caption Id" columns → Save
  7. SetCreated by to Lookup value → Supervisor
  8. SetIsRead to Boolean value → "False." 
  9. SetNotificationType to Lookup value → "Notification." 
  10. SetObject to Lookup value → "Activity." 
  11. SetSource to Lookup value → "Created by." 
  12. SetTime to Date and time → "Current date and time." 
  13. SetTitle to "You were added as a participant to an activity." 
  14. SetTo to "Current user contact." 
  15. SetUnique caption Id to Process parameter → Participant added → "Unique identifier of record." 

Fig. 2 Add data element 

 Fig. 2 Add data element
 

  1. Save the business process

 

As a result of the business process, every time a user contact is added as a participant to an activity, they will receive the corresponding message to the System messages sidebar of the notification panel. 

 

Like 2

Like

Share

0 comments
Show all comments

I want to read all records and then update them using a sub process, but there is a limit to reading records. how can I read all records and update them?

Like 0

Like

6 comments
Best reply

Hi Valdimir, 

 

Sure, first off all add a new boolean column on you account object, like processed, your main process like this

 

As I remember, there was a limit of 5000 records. If we need to process more, we create a script

Vladimir Sokolov,

You can add a column to track processed records and loop the read collection until there not unprocessed records, using the track column, for example. In this way, you have no limits

Julio.Falcon_Nodos,

Can you give me an example?

Julio.Falcon_Nodos,

As I remember, process cannot loop more than 5000 times either

Vladimir Sokolov,

Can you give me a sample script to update it?

Hi Valdimir, 

 

Sure, first off all add a new boolean column on you account object, like processed, your main process like this

 

Show all comments

I’m currently working on establishing a two-way connection between two applications in Creatio for adding and modifying records.
 

  1. One-Way Connection: I successfully created two business processes that allow for one-way synchronization of records.
  2. Two-Way Connection Issue: However, when I attempt to set up the two-way synchronization, it leads to the creation of multiple records in an infinite loop instead of just one record being created or updated.

 

Could anyone provide guidance on how to avoid this infinite loop in a two-way connection? Any insights on best practices for implementing two-way synchronization in Creatio would also be greatly appreciated.
 

I can provide screenshots of my setup for further clarification if needed. I followed the same process for the one-way connection as shown in the attached business process screenshot.

Like 0

Like

2 comments

Good day,

The issue you're encountering is related to the number of records being passed to the subprocess. Here are some suggestions for resolving this situation:

1. Add or adjust recursion trigger conditions:
   - For instance, if the trigger is based on changes to the `Contact.Age` field, consider adding a condition to ensure the age is not empty before initiating recursion.

2. Redesign the process to avoid recursion:
   - Replace recursion with iteration: Instead of processing records one by one with recursion, you can read and process multiple records in a sequential manner, ensuring that you do not handle a new record until the current one is fully processed.
   - Consolidate changes into a single process: Rather than reacting to various changes across different processes, use one process to handle all necessary changes at once. For example, initiate triggers in a single business process (BP) with all modifications related to a specific entity, which helps in minimizing and managing recursion more effectively.

It is crucial to first review the process logic with the above suggestions, as increasing the `MaximumBackgroundRecursionDepth` parameter could lead to application performance issues, such as slowing down or exhausting server memory, which might result in application restarts or stops.

In your system, the `MaximumBackgroundRecursionDepth` parameter is currently set to 100 (default is 100). The issue arises when the number of subprocess calls exceeds this value.

To address this problem, you may need to increase the `MaximumBackgroundRecursionDepth` parameter to accommodate all records, rather than only the initial 100.

Regards,
Orkhan

You need to have some way to determine the source of a record, so if the record came from the other object, you don't send it back again. 

For records added in "Data App", you'd flag those as coming from "Data App" when adding in "Info App", so the process that syncs from "Info App" back to "Data App" knows to exclude it from sending back to "Data App", etc.

If the records need to sync updates as well, you'd want to store the original record's Id value so you know where to update. You could then use the column storing the Id to know to exclude sending it back to add.

Ryan

Show all comments

I am currently developing an application where I need to add a "Sync Data" button to both the Accounts and Contacts sections. This button will trigger a Business Process that needs to work dynamically based on the context from which it is called.
 

The key requirement is to use a single, common Business Process for both Accounts and Contacts. In this process, I need to determine whether the button was clicked from the context of Accounts or Contacts, so the appropriate actions can be taken accordingly.
 

I understand that creating separate Business Processes for Accounts and Contacts could achieve this, but my goal is to have a unified process or function that can be reused across multiple entities.
 

I would greatly appreciate any guidance or suggestions on how to implement this in Creatio.

Thank you in advance for your assistance!

Like 0

Like

1 comments
Best reply

Create a boolean parameter "IsContact"(it's just an example, you could create any parameter ) and pass true if the button is clicked on contact page and false if it's clicked in any other place 

Create a boolean parameter "IsContact"(it's just an example, you could create any parameter ) and pass true if the button is clicked on contact page and false if it's clicked in any other place 

Show all comments

Hello.

I have a freedom UI FormPage, which may be opened from Business process (Open edit page element). I want to override Cancel button handler in such way that to cancel current business process. I need to know process id (SysProcessLog table) or process element id (SysProcessElementLog table). How could I obtain them in Freedom UI? For example in Classic UI edit page there was dedicated attribute called ProcessData. I looked through request.$context and didn't find anything similar.

 

Creatio version is 8.1.2

Like 0

Like

2 comments

Hello!

 

To find information, you can read the data from SysProcessData, more information which contains the interrelationship between the process instance and the subprocess, the relationship to the process scheme, the relationship to the process scheme element if the instance is a subprocess, and the current status of the process instance. Also, the internal state of the process is a snapshot of the values of the parameters at times when the process elements are executed.

 

Also, this article could be useful:

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/development-tools/external-ides/examples/develop-c-sharp-code-in-a-custom-project

 

Kyrylo Atamanenko,

Thanks for an answer. But to read all those information I need to know Id of an element being executed. For example in Classic UI it is obtained like 

this. 

const processElementUId = this.get("ProcessData").procElUId;

And the question is there analogue in Freeom UI page?

Show all comments

Hello,

 

I have a web service that generates a file. I need to attach that file to a record. I see there is an option to the Process File Component passing a File as parameter, but the Parameter is Expecting a IFileLocator. How can I use a script to create a IFileLocator from a full file path on Creatio Studio version 8.1? 

 

Thanks,

Jose

File attachments
Like 0

Like

2 comments
Best reply

Hello,

You should use a script task to work with files from the web service.

 

More details about the API file:



https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

Hello,

You should use a script task to work with files from the web service.

 

More details about the API file:



https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

Thanks Cherednichenko. Using the information provided I wrote the C# below to attach a generated file to a record.



public void AttachFile(string schemaName, Guid recordId, string fullFilePath) {

            /* Create a unique ID for the new file. */

            Guid fileId = Guid.NewGuid(); 

            /* Create a file locator for the new file. */

            var fileLocator= new EntityFileLocator("SysFile", fileId); 

            /* Get an IFile object for the new file. */ 

            IFile file = UserConnection.CreateFile(fileLocator); 

            /* There is no file metadata or file content in the available file storages. Specify the file name in the file metadata. */

            file.Name = (new System.IO.FileInfo(fullFilePath)).Name; 

            /* Set an attributes for the new file: */

            file.SetAttribute("RecordSchemaName", schemaName); 

            file.SetAttribute("RecordId", recordId);             

            /* Save the file metadata Do this BEFORE saving the content. */

            file.Save(); 

            using (var sourceStream = new FileStream( fullFilePath, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize: 4096, useAsync: true)) {

                file.Write(sourceStream, FileWriteOptions.SinglePart);            

            }

        }

Show all comments

Hello,

 

I have a problem when trying to modify a lookup value in a Business Process. I have a Source field in Opportunity and when I first select the lookup it displays all of the values. After I click on anything else this happens:

The problem is that there are values in the lookup. I don't know what is happening.

 

Thank you!

Like 0

Like

1 comments

Hello,

 

It`s seems to be an issue that our support should take a look. Please send us an email at support@creatio.com

 

Best regards,

Serhii

Show all comments
Question

Hi, 

Can you help me on this use case in which the activities are created based on the user input?

for example, if I input in the field:

Activity quantity: 3 

then 3 activites are created with 3 different Subjects: activity 1, activity 2, activity 3.

Thanks 

 

Like 0

Like

2 comments

Hello,



Your business task could be achieved by the business process. For example:

 

1. Create Parameters: Start by adding parameters to the process to input values such as "start date," "end date," and "user." 



2. Configure the Business Process:

Add a pre-configured page where you can input the required values.

Use formulas to set the start and end dates using the parameters you defined earlier.

Add an "Add data" element to create a new activity. Configure the columns for start and end date, type, and user.

 

3. Add a conditional flow with a condition to check if the date doesn't match the end date from the pre-configured page.

If the condition is true, proceed to the next formula element to increment

Nguyen Trang,

 

We are sending you the Conditional flow instruction, for your review. If you have any specific questions about this, please describe them in more detail.

 

Show all comments

Hi all,

 

How to copy a new business process from the development server to the production server?

 

Thank you.

Like 0

Like

1 comments

Hi David,



Processes are transferred to the same other custom changes. Please see this article about transferring changes from site to site:

https://academy.creatio.com/docs/7-17/developer/development_tools/packa…

Show all comments

I am trying to process a collection of objects. But I am unsure how to pass the collection from a read data element in a business process to a user task. I am also unsure what parameter type I should use on the user task. Can someone tell me the name of a process/user task in creatio I can look at for an example? Or tell me how I can do this?

Like 0

Like

2 comments

Hello, Josh.

I think you can find an example here 

https://academy.creatio.com/docs/user/bpm_tools/process_elements_refere…

Check the example with CompositeObjectList

Hello, Josh.

Check this article 

https://academy.creatio.com/docs/user/bpm_tools/process_elements_refere…

 

Example you need is CompositeObjectList

Show all comments