Hello, How to automatically run a process as soon as a page is opened

 

Like 2

Like

1 comments

Hello,

To achieve your goal, you will need to apply the development.

You can find basic examples for launching the process from the page from our partners CustomerFX:

1) Starting a Process from Client-Side Code on a Creatio Freedom UI Page

2) Programmatically Starting a Process from Client Code in Creatio

Thank you.

Show all comments

In this Code "CollectionParameter" is Collection of records type.

 

const handlerChain = sdk.HandlerChainService.instance;
const result = await handlerChain.process({
    type: "crt.RunBusinessProcessRequest",
    processName: "UsrSomeProcess1",
    processParameters: {
      CollectionParameter : //How it should be passed ?
      SomeParameter: "Some Value" //ID Paramete
    },
    $context: request.$context
});
 
if (result.success) {
    // process was sucessfully executed
}

 

 

Like 0

Like

1 comments

Hello!

 

You can use the ProcessEngineService in order to run a business process through a web service and send a collection parameter. The Academy has published an article with a detailed example of how to use ProcessEngineService, which you can find at https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/integrations-and-api/business-process-service/examples/run-the-business-process-web-service

Additionally, there's an overview of the web service that explains how to send a key-value collection of incoming parameters, and you can access it at https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/integrations-and-api/business-process-service/overview

Show all comments

Is there a system table that can be queried to find out which section and/or detail run process menu(s) a process is found in?  Or any other way of doing this?

 

*Edit*  A query to find out what section(s) an object is a detail in would be quite helpful.

 

Thanks,

Like 1

Like

3 comments

Hi Gareth,

 

Thank you for reaching out!

 

This is the ProcessInModules table.

 

Also, there is no differentiation in Creatio between section and detail objects. So basically, an object is the same for a detail and a section. You could use the following script:

 

SELECT DISTINCT ss.Name , 
CASE 
WHEN EXISTS (SELECT 1 FROM  SysModule WHERE SysModuleEntityId IN (SELECT Id FROM SysModuleEntity WHERE SysEntitySchemaUId = ss.Uid)) THEN 'Section' 
WHEN EXISTS (SELECT 1 FROM  SysDetail WHERE EntitySchemaUId = ss.Uid) THEN 'Detail' 
else '' 
END AS "Section/Detail"
FROM SysSchema ss 
WHERE EXISTS SELECT 1 FROM  SysModule WHERE SysModuleEntityId IN (SELECT Id FROM SysModuleEntity WHERE SysEntitySchemaUId = ss.Uid) 
OR EXISTS
 (SELECT 1 FROM  SysDetail WHERE EntitySchemaUId = ss.Uid)
AND 
 ss.ManagerName = 'EntitySchemaManager'

 

Best regards,

Anastasiia

*Edit* The below queries return both active and inactive processes., at a glance I am not able see how to select active only.

 

The query we arrived at to list the processes in the run process menu of sections:

SELECT SM.Caption AS [Section Name], SS.Caption AS [Process Name] 
FROM ProcessInModules AS PIM 
JOIN SysModule AS SM ON PIM.SysModuleId = SM.Id 
JOIN SysSchema AS SS ON PIM.SysSchemaUId = SS.UId; 

And the query to list the processes in the run process menu of individual details:

SELECT SD.Caption AS [Detail Name], SS.Caption AS [Process Name] 
FROM ProcessInDetails AS PID 
JOIN SysDetail AS SD ON PID.SysDetailId = SD.Id 
JOIN SysSchema AS SS ON PID.SysSchemaUId = SS.UId; 

I would like to be able to say what sections a detail appears in, but would imagine this information to be buried deep in Creatio system tables.

 

If anyone can check the above queries I would be grateful!

Hi Gareth,

 

The queries you have written are correct. However, it's hard to check which details belong to which sections by a DB query as details are connected to a page in the page's schema. So you need to decode the schema's content and filter in it. Such a query is hard to build and it will take a long time for it to get executed.

 

Best regards,

Anastasiia

Show all comments

Hi Community,

In mobile application I have a button "Terminar" that when I press it I want run a process from my process library in Creatio.

To implement this button I created the following component and a function "onClickMeButtonClick", that is responsable for executing the process after pressing the button. To execute the process I used "Terrasoft.configuration.ProcessModuleUtilities", but I'm not sure if this is the best way to implement this example.

Any idea on how to develop this logic?

 

Thanks an advance.

 

Best Regards,

Daniel Longo

Like 0

Like

2 comments

Hello Daniel,

 

The mobile application UI doesn't support working with business processes and processes are only triggered on the server side in real-time once the record is modified in the mobile application or record is added (and correspondent start signals are present in some process).

 

Our core R&D team already has a task to make it possible to work with business processes from the UI directly and I will also let them know about your post so to prioritize the task for them.

 

Thank you for helping us in making the app better!

 

Best regards,

Oscar

Thank You Oscar.

I think it is a important feature for the application, so that the actions of the buttons can be dynamic and don't just give it "Message Alerts".

 

Best Regards,

Daniel Longo

Show all comments

Hi Community,

 

I have this situation where I need to excute some process through client side. While executing this process I want to pass a collection of ids to one of the process parameters. These ids are the Quotes that I multi-selected in the image bellow.

Pressing the  "Merge Quote" button will execute the following code.

This code will create a new collection with all the ids selected before and send them to my process. The next image shows the collection created.

I want to know which type of data should I use for my parameter in my process for this type of collection, where can I learn more about these types of collections and its methods and how can I access its values with the various process tasks?

 

For tests purposes I want to display one of the ids using a "Open Popup Window". 

 

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro.

Like 1

Like

1 comments

Hello Pedro,

 

Creatio works with collections if it's needed to process such data but not to display it. You can pass items to sub_process or web_service elements or perform some script_task over it. Please refer to https://academy.creatio.com/docs/user/bpm_tools/business_process_setup/process_collections where this process is described.

 

In case if you want to work with the result of your script that returns a collection as described in your example,  you need to write it in a text string with ";" separator for Id's and then - split it on the next step to parse Id's and reflect them where you want.

 

Best regards,

Bogdan

Show all comments

I have simple process and it didn`t start on time. Also in some case it still Running. Why it happen?

 

Also last month, this process did not start on time and is still Running:

 

How I can fix it?

Like 0

Like

1 comments

Nataliia,

 

As for the business process in the "Running" status - it happens since you have the script task that is still running (performing actions due to the logic specified in this script task), so that's why the whole process is in the "Running" status as well.

 

As for starting the process in time: a delayed start can happen in case there are many tasks in the scheduler. You can simply modify the value of the quartz.threadPool.threadCount parameter in the root Web.config file (described here) from the default 5 to 10 and after that the process should run in time. In case you have the on-site application you can simply do it due to the recommendations in the article, but in case it is cloud based app please email us at support@creatio.com and provide us with the name of this app and we will do it.

 

Best regards,

Oscar

Show all comments

Creatio CRM has the feature of exporting data by filtering some records. Then we can export the data using the export to excel option.

However, for customers(end user) it may be confusing to apply multiple filters.

 

In this case lets suppose I only want to apply filter to only 2 fields.

So I want to create a process which will ask user to input values for those 2 filters. After that process will automatically generate a excel file which have all the records filtered according to the 2 filters input values.

 

Is this possible to do so?

I tried to create process but how to export data I can not figure out.

 

Like 0

Like

4 comments

Hello Ramnath,

 

It is better to use a standard scenario of specifying the filter and exporting records using the "Export to excel" action in the section. If you could create a script-task that could trigger the "ReportService" service and "GetExportToExcelKey" method inside this service based on the filtering parameters than this process could be executed. But we have no examples of this logic implementations so you need to look through the "GetExportToExcelKey" method and test it on your side.

 

Best regards,

Oscar

Hey Oscar,

 

I have very less development experience on Creatio Platform so I can't think I can develop scripts right now.

 

Rather I came up with another solution - Dynamic folder with access rights. So user will have access to the dynamic folder where they can filter record according to two fields. But I am unsure if giving them edit access may result in modifying the filter parameters. 

 

For example I want to find all the records that were created in between a period - I can create a dynamic folder with two fields -

(Created on > date_1 and Created on <date_2)

 

But having access to edit dynamic folder, the customer can also modify Created on parameter to modified on. 

RAMNATH SHARMA,

 

They cannot modify the Created On value of the record (since we are discussing the Created On column for records not for the folder itself (by the way they cannot modify Created On for folders as well)).

 

Yes, the client can modify the parameter itself (replace Created On with Modified On), but the client needs to understand that he/she shouldn't do it. By the way the client can create such a filter on their own (the possibility of advanced filters was developed for such proposes). Why there should be a process that should do this? It is easier to do it manually than via a process.

 

Also you can remove edit access rights for all users in the system using the "Change access rights" process element. As a result the client will see the folder, but won't be able to modify it.

 

Best regards,

Oscar

Oscar,

I thought of making the the process of exporting data easily with one click. That's why I wanted to see if it's possible with process.

Show all comments

Dear mates,

Since the Creatio version update, i've an opportunity process which does not open the order pageanymore.

When an opportunity is closed won, it launch a process which create a new order and must open it.

i can not find why the order is not open by the process. the order is well created with all the informations requested, but the order page is not opened

 

when i look into the Process log, everything is ok :

Does anybody have a suggestion to resolve this issue ?

Thank you,

Nicolas

Like 0

Like

2 comments

Well the process created me an activity name "Open Order", but it did not open the order.

How can i directly open the order with the process ?

LÉZORAY Nicolas,

Remove checkBox from "Run following elements in the background" on your start 

Show all comments

Hi everybody,

 

I'm trying to introduce a method that when selecting an element from the grid, it saves the id of an attribute in a variable I created and when I delete that same record it has to start a process.

However, when I run all this pops up this error.

This is the code i implemented in order to achieve this.

Thanks in advance.

 

Best regards,

Pedro Pinheiro

Like 1

Like

2 comments
Best reply

The order of the modules at the top doesn't match/line up. You have this:

define("imdSchema10Detail", ["ConfigurationGrid", "ConfigurationGridGenerator", "ConfigurationGridUtilities", "ProcessModuleUtilities"] function(ProcessModuleUtilities) {

You're actually getting ConfigurationGrid loaded into the ProcessModuleUtilities param since it's the first AMD module listed, which will go into the first param. You need to change the order to this:

define("imdSchema10Detail", ["ProcessModuleUtilities", "ConfigurationGrid", "ConfigurationGridGenerator", "ConfigurationGridUtilities"] function(ProcessModuleUtilities) {

Ryan 

The order of the modules at the top doesn't match/line up. You have this:

define("imdSchema10Detail", ["ConfigurationGrid", "ConfigurationGridGenerator", "ConfigurationGridUtilities", "ProcessModuleUtilities"] function(ProcessModuleUtilities) {

You're actually getting ConfigurationGrid loaded into the ProcessModuleUtilities param since it's the first AMD module listed, which will go into the first param. You need to change the order to this:

define("imdSchema10Detail", ["ProcessModuleUtilities", "ConfigurationGrid", "ConfigurationGridGenerator", "ConfigurationGridUtilities"] function(ProcessModuleUtilities) {

Ryan 

Ryan Farley,

​​​​​​The solution you provided is working. 

 

Thank you.

 

Best regards,

Pedro Pinheiro

Show all comments

Hello all,

 

I have several business processes that my users start from the contact record. Each opens a pre-configured page that allows my users to record information and make connections to other objects. 

However, some of them take longer to start that I'd like. Is there any methods that I should investigate to try and improve performance? There aren't any steps before the preconfigured page so I'm not sure what more I could do.

Like 0

Like

1 comments

Dear Kevin, 

 

Unfortunately, only from this screenshot, it is hard to tell what could be the issue. Please check that there are no web socket issues in your browser. Also, if your application is deployed on-site, please check that web sockets are set up correctly. If it is not the issue please contact support team at support@creatio.com

 

Best regards, 

Dennis 

Show all comments