Hello Community!



I confronted with the problem of creating a сycle passing through the records of the detail.

The Account page has a detail Address. How can I pass through the detail's Address records in the business process to change the value of the field in this detail?

Can anyone help on this issue.

Best regards,

Mariia

Like 0

Like

1 comments

Dear Mariia,

To add a record to account address for specific account you can use a business process with a parameter like on the screenshot http://prntscr.com/me25i0. This process will add one record to account address detail for "Test" account. To edit existing records in this detail you can build a business process like on the screenshot http://prntscr.com/me25ys. This process will change ZIP code for an account "Test" and it will be done for the record which have ZIP code set for 322. You can also add parameters to your business process and use them when triggering a process. You can also bind a business process to a page so to be able to trigger this process for a particular account record. Please read more about binding business process to a page here.

Best regards,

Oscar

Show all comments

I'm trying to pass a Guid from a script task to a subprocess.

Here is the entire process: http://prntscr.com/mc2cmv 

The code of the script task is:

 

var pipelineId = Entity.UsrPipelineId;
 
//pass pipelineId to GenerateUBOPositionSubProcess
 
return true;

What would I have to write? The subprocess has a parameter defined that is named PipelineId (http://prntscr.com/mc2ej9).

Like 0

Like

5 comments

You can set process parameter in the script:

Set("PipelineId", pipelineId);

That sets the parameter for the process that contains the script task, but not for a subprocess that is further down the line from the script task (see the first link I included), I thought? Or do processes and subprocesses share parameters?

Dear Jonas,

You can use this coder to pass the value:

UserConnection userConnection = Get<UserConnection>("UserConnection");

IProcessEngine processEngine = userConnection.ProcessEngine;

IProcessExecutor processExecutor = processEngine.ProcessExecutor;

var nameValues = new Dictionary<string, string>();

int parameter1Value = 100;

nameValues["parameter1"] = parameter1Value.ToString();

processExecutor.Execute("UsrProcessCustom", nameValues);

return true;

Best regards,

Dean

Thank you. I will start testing this today. 

Now I need to know how to get data back from that process. Is that possible?

Dear Jonas,

You can try to add another element in your subprocess and use the same script to pass the values back to the parent process. 

Dean

Show all comments

Hi Community,

 

Is it possible to trigger a business process after new user was created?

 

I tried it, but it seems the process is not triggered. I also check the process log but this process is not there.

 

Like 0

Like

1 comments

Hi Community,

I want to call a process on the 
client side and when it ends, for example, update certain values ​​of the page. 
Is it possible using the callback? 
The callback works but the page with the caption of loading remains. I Have this example:

var someFunction = function (a) { 

                                    

                                    this.loadSchemaCaptionByName("UsrApproveBSRankedCompare", function(caption) {

                                                this._showSuccessfullyRunProcessPopup("The process has been completed");

                                            }, this);

                                    

                                };

                                this.executeProcess(args , someFunction)

 

executeProcess: function(sysProcessName, callback) {

                ProcessModuleUtilities.responseCallback = callback;

                ProcessModuleUtilities.executeProcess(sysProcessName)

            }    

 

 

Thank you!

regards

Like 0

Like

2 comments

Dear Uriel,

In order to complete your task you need to split it into two parts:

1. Launch the business process call from client side. Please see the following article and link for more details:

https://community.bpmonline.com/questions/trigger-business-process-clie…

https://academy.bpmonline.com/documents/technic-sdk/7-13/process-launch…

2. After the process executes, it needs to send the signal to the client side to proceed further with the logic. The example of such logic you can find in the following thread of our Community:

https://community.bpmonline.com/questions/refresh-page-fields-after-pro…

Regards,

Anastasia

 

Show all comments

I am using the Update Query to save an object programmatically. I also created a business process that is triggered when this object is updated.

After updating the object programmatically using Update Query, the process is not triggered.

Is there any methods on the business layer that i can use for this purpose?

Like 0

Like

2 comments

Hello.

The business process cannot be triggered after the direct update in the database. That is done on purpose. You can create another process that would do the update for you, the updates made by the business process trigger other business processes. However, we do not recommend you to do this for large batches of records.

Best regards,

Matt

We used Entity.Save() method and it worked. https://academy.bpmonline.com/api/SDKNETAPI/7.7.0/Terrasoft.Core~Terras…;

 

Show all comments

Hello Community! I need create a case for each collection recived in a web service call and i can make it with a script task but the problem is the number of case. How can generate a ordinal number for each record in the loop?

Regards,

Like 0

Like

1 comments

If you could do it as a separate task in the process, you could use a User Task with "Generate ordinal number" to populate that. If you wanted to do it in the loop in your script task code, you could read the system settings for CaseCodeMask (which contains the prefix string) and CaseLastNumber (which contains the last number used). Then increment the value for each case and then write back the last value used to the CaseLastNumber setting.

FYI this is how the UserTask does this: https://github.com/CustomerFX/BpmOnlineBase/blob/9a8a337a470d914a6ec00f…

Show all comments

Hi community!

How are you?

When i select a row from a detail, appear the business Process list that i can run

 

How can I hide a business process option from the list based on the condition of some field in that row?

King Regards,

Ezequiel

Like 0

Like

1 comments

The menu is bound to the "RunProcessButtonMenuItems" attribute in the "BaseGridDetailV2" module. You can override the getProcessButtonVisible method in the detail module or change the attribute after modifying a value by the mentioned condition. 

Show all comments

I need to add a calculated hyperlink inside the body of a [Send email] process element (for example the link to the page of an account: when the user clicks on the link inside the email, then the browser opens the account page)

I didn't find the way to do it using custom email and email templates as well.

How can I do it?

Like 1

Like

8 comments

Hello.

You can do it with the help of macros. First of all you need to create a template and select a desired macro source and then you can copy a part of the link without the record id like this and add a macro at the end of the link like this: http://test.bpmonline.com/0/Nui/ViewModule.aspx#CardModuleV2/AccountPag…]

That can be done without any additional configuration, you can also create an html link if you want (in order to hide the full link you will have to develop an html template block)

You can read more below:

https://academy.bpmonline.com/documents/administration/7-13/how-create-…

Best regards,

Matt

Thank's Matt, you solved my question

Could you please share the steps , I am unable to open this link . I also want to add a customised url link in my email body. 

 

Thanks

 

Shailey,

Hello,

Here is an example how I did it using "Accounts" section as an example (please refer to this screenshot http://prntscr.com/njtzkv). Please also note that I used account "Our company" as an example, but you can bind this process to a section if needed. Also please note that you need to build separate processes for different objects of the application. And here is my model of this process:

1) Create a "String" parameter in process parameters (you can read about it here https://academy.bpmonline.com/documents/technic-bpms/7-13/process-parameters). This parameter will be used to convert the ID of the record from "Accounts" object to "String" data type.

2) Add "Read data" element that will read all data from the object, from which the process should start (in my example it is "Accounts")

3) Create formula that will set the value of "http://o-drobina:8001/0/Nui/ViewModule.aspx#CardModuleV2/AccountPageV2/edit/"+[#Read data 1.First item of resulting collection.Id#].ToString()" for "Parameter 1" parameter. This value is formed as:

http://o-drobina:8001/0/Nui/ViewModule.aspx#CardModuleV2/AccountPageV2/edit/ ( which is standard link to the edit page of Account section record) + [#Read data 1.First item of resulting collection.Id#].ToString() (which is conversion of UID value read from "Read data" element to string). This conversion is needed, because the link should be text completely. And it will be used in "Send email" element in the next step.

4) In the "Send email" element please specify all needed parameters (To, from, CC etc.) and the email body should look like this http://prntscr.com/njtxoq.

As a result you will receive an email with link which can be used to redirect users to the needed record in the application http://prntscr.com/njtydz and http://prntscr.com/njtynp.

Best regards,

Oscar

Oscar Dylan,

Hi,

I tried doing what you suggested but get the link as a string and not as hyperlink.

How do I make it be a link?

 

I ended up creating a template message and there used the Link to object feature. (There you can also hind the full text and put different parameter for the view)

Hi,

Would still like to know how to get this work through the custom email and not template.

Thanks.

Anyone?

Show all comments

Hi Community,

How can I call/trigger my business process under methods in client code?

Thanks

 

Like 0

Like

2 comments

This is solved

In order to trigger business process in Client Code, take the following actions: 1. Connect ProcessModuleUtilities module to a module of the page, from which the business process will be called.

2. Call executeProcess(args) method from ProcessModuleUtilities module by 

transferring args object with such properties.

Example

define("AccountPageV2", ["ProcessModuleUtilities"], function(ProcessModuleUtilities) {
    return {
        entitySchemaName: "Account",
        methods: {
            // Проверяет, заполнено ли поле [Основной контакт] страницы.
            isAccountPrimaryContactSet: function() {
                return this.get("PrimaryContact") ? true : false;
            },
            // Переопределение базового виртуального метода, возвращающего коллекцию действий страницы редактирования.
            getActions: function() {
                var actionMenuItems = this.callParent(arguments);
                actionMenuItems.addItem(this.getActionsMenuItem({
                    Type: "Terrasoft.MenuSeparator",
                    Caption: ""
                }));
                actionMenuItems.addItem(this.getActionsMenuItem({
                    "Caption": { bindTo: "Resources.Strings.CallProcessCaption" },
                    "Tag": "callCustomProcess"                
                }));
                return actionMenuItems;
            },
            // call you porcess
            callCustomProcess: function() {
                var contactParameter = this.get("PrimaryContact");
                var args = {
                    // Process name
                    sysProcessName: "UsrCustomProcess",
                    // parameters process
                    parameters: {
                        ProcessSchemaContactParameter: contactParameter.value
                    }
                };
                // run process
                ProcessModuleUtilities.executeProcess(args);
            }
        }
    };
});

 

Show all comments