Hi,

I want to run a process for all the records of a section where the business process reads two values of the respective record, modifies a field in that particular record and then does the same for every record in the section.

But I am not sure how to run the process for every single record. I am using Read data element and Reading the first record in the selection which gives the results for the last record that was created in the system but it does not run for every record in the section.

Could someone help?

Like 1

Like

5 comments

I think u can use 'flag' . U can create a new field in the table (not displayed on UI) , mark it 'N' as default for all the records and run the process in loop and update every time it is  N and set the particular record 'Y'  after processing . U can also set how many times the loop should run, default value is 100 u can update it a value according to the data size you are trying to work upon!!  I hope that helps . 

Shailey,

 I already have a lookup and I want to run the process based on the value of that lookup. Will that work or is it essential to have that flag? Can that lookup not act as the flag?

aaykay,

You can use record tag also. First put tag for all records which have specific value for the lookup as "to be processed", then on by one read all records with this tag, after processing, change the tag to some other tag say "processed"

Hi,

I am following as you suggested but the process only runs for the first record.

Shailey writes:

I think u can use 'flag' . U can create a new field in the table (not displayed on UI) , mark it 'N' as default for all the records and run the process in loop and update every time it is N and set the particular record 'Y' after processing

Show all comments

In the properties for running a business process from section, enable conditions for running a process.  For example, the current user may need to have a specific role assigned or the record may need to be in one or more statuses.

1 comments

Dear Janine, 

We've registered the request to the development team to add the functionality. Thank you for the idea! 

Best regards,

Dennis 

Show all comments

Hallo Please help

i already implementation sending data using BP from external :https://academy.bpmonline.com/documents/technic-sdk/7-13/how-run-bpmonl…

but when we call from other application is needed to login first

is any idea how to call web service business process from other apps ?

Like 0

Like

3 comments

call login, then get login cookies and then call the service with the cookies. 

please find the example in the article by the link below.

https://academy.bpmonline.com/documents/technic-sdk/7-13/executing-odata-queries-using-fiddler

Hi,

I'm also facing same issue; to call any custom web-service from web-service designer tool in Creatio it needs to pass Cookies. And to get these cookies, I need to login first.

And one more thing, if you're calling login service in Business Process you don't get Cookies. Is there any way to get cookies & pass them into further service calls?

@Eugene, this page is not available now: `Page not found | Creatio Academy`

Show all comments

Hi,

I am trying to build a process that will subtract 2 dates and record the difference in an integer field for all the records in the CRM. But for some reason, I can not get the result as required.

 

 

Like 0

Like

14 comments

Hello, 

Formula value uses standard C# syntax. In your case subtraction of 2 datetime fields gives you a TimeSpan, you can get the number of days in the TimeSpan by using Days property (TotalHours if you want to calculate difference in hours). 

So to get the difference between 2 date fields you can do the following formula: 

([#Date 1#] - [#Date 2#]).Days

You can assign this value to a business process parameter and them with modify data update the needed field with this parameter. 

Best regards,

Dennis

Dennis Hudson,

 Thanks for the reply. I am trying to build a business process to run every morning and that process should read the two dates and update field with the difference in those dates in days.

Can you guide with how to build such a process?

Currently it's as below and is really working. Just can't figure out how to read all the records and then update the field based on the current values of the record.

 

aaykay,

There are 2 options how you can do that: 

1) You can add a boolean column to your object (Something like Processed) and loop through all records, which have processed = false. After that you can read the first record in the selection with the mentioned filter, process date columns and after that set the Processed to true. You would need to loop until there is a record that has processed = false (count > 0). 

After all the mentioned operations you would need to set Processed of all records to false (one Modify data element). 

2) You can read all records as a collection, pass it to script task and operate with them in a script task. Here is some documentation on using collection: 

 https://community.bpmonline.com/questions/use-collection-parameter-script-task

https://community.bpmonline.com/questions/use-script-task-update-column-read-data-result-collection

Best regards, 

Dennis 

Dennis Hudson writes:

You can add a boolean column to your object (Something like Processed) and loop through all records, which have processed = false.

 

How do I loop through the records in the business process?

aaykay,

It should look similar to the screenshot below:

http://prntscr.com/nr79cf

Best regards,

Dennis

Dennis Hudson,

 When I run the process and put a constant number such as 07 or 50 or any other value, the business process updates the value in the specified field. But when I try to compute the value using the dates, it doesn't work. I am using the same formula as you mentioned earlier in the first comment (date2 - date1).Days.

Can you tell what might be going wrong?

aaykay,

Could you please specify what do you mean by 'doesn't work'? It gives you an error or the value is incorrect? In first case please give me an error message, in the second case - what dates do you input and value do you get when using the formula? Also, could you please send a screenshot of your formula and a part of process flow in which you use it? 

Dennis Hudson,

 Here are the screenshots:

1. Complete Process

2. Date formula for filled

 

3. Date formula if closed:

 

4. Final modification:

 

I am neither getting an error nor any other response. The integer field that I am trying to update shows value = 0, which I guess is the default value of field of type integer. 

Dennis Hudson,

 I omitted conditional flow and now I am getting the following output when I run the process for only status = Closed

The variable "DateDifference" now has value = -737,065

aaykay,

It happens because one of the date values is empty, if you fill in both date/time fields you should get a correct result. 

aaykay writes:

The variable "DateDifference" now has value = -737,065

Dennis Hudson,

Both the fields are filled. Please find the screenshot below.

aaykay,

Probably you are calculating those fields using the dates of one particular record that has one of the dates not filled in, and not for each record separately. Please write to the support@bpmonline.com for more detailed analysis. I've double checked the formula itself and it works fine, probably the issue is in the process flow.

Best regards,

Dennis  

Dennis Hudson,

 You can find the business process in the screenshots above. Even I think something is not upto the mark with process but only if I knew.

aaykay,

It's hard to determine what's wrong here from screenshots. I think it will be better to contact support. 

Show all comments

How do I parse a String using a formula or condition?  For example, if I want to do a comparison of the last three characters of a String, could I use [#Example String#].Right(3)=="-00"?  Is there a length function? Please provide the available functions.

Like 0

Like

1 comments

Dear Janine, 

You can perform all standard C# methods in formula (including all string operations). In your case you can use the following:

[#Example String#].Substring([#Example String#].Length - 3) == "-00"

or

[#Read data 1.First item of resulting collection.Full name#].EndsWith("-00")

Best regards,

Dennis

Show all comments

A big security hole in using cases to display the status of a record is that the stage can be manually changed even when the stage field is Read Only.  I intentionally set a status field to Read Only so that a process manages the status changes, but if I use it to display stage flow visually, I can still click on the case display to change the status, which is undesirable.

1 comments

Dear Janine,

I will forward this to our R&D department so they could consider enhancing the following functionality in the upcoming releases.Thank you for the idea!

Best regards,

Angela

Show all comments

There seems to be a new interface available for Object Permissions.  However, some of our team sees the new interface when we click on the link in System Designer, while others are taken to the Advanced settings page.  Is there a setting that configures which interface individuals see or is this part of beta testing?

Like 0

Like

10 comments

Hi,

Link "Object permission" will take you to the new interface, while "Advanced settings" in admin area are still leading to old interface. May be those users used different links? 

Best regards,

Angela

Angela Reyes,

Using the Object permissions link takes me to the page in Advanced settings, not the new UI. This is true for all but one member of my team. The new functionality is not working reliably.

Janine White,

It is likely that internal feature that turns on this functionality is turned on only for that user. Tu turn that on for all users you can run the following SQL script: 

DECLARE @featureCode varchar(max) = 'NewRightsManagementUI',

 @featureId uniqueidentifier;

set @featureId = (select top 1 Id from Feature where Code = @featureCode);

IF @featureId is null

BEGIN

 insert into Feature

  (Name, Code)

 values

  (@featureCode, @featureCode);

 set @featureId = (select top 1 Id from Feature where Code = @featureCode);

END;

delete from AdminUnitFeatureState where FeatureId = @featureId;

insert into AdminUnitFeatureState

 (SysAdminUnitId, FeatureState, FeatureId)

values

 ('A29A3BA5-4B0D-DE11-9A51-005056C00008', 1, @featureId);

Best regards,

Dennis

Dennis Hudson,

How did that get turned on for only one user in our instance?  I thought this was a core feature of bpm'online studio. This is not something that we have set.  If it is being implemented universally for System Administrators, shouldn't there be a setting for it and/or be implemented for all or none based on the System Administrator role automatically?  Will we have to do this every time there is a new System Administrator? This seems like a bug, not a feature, to me.

Janine White,

Unfortunately it is hard to tell how it could get turned on only for only one user as the changes in AdminUnitFeatureState are not logged by default. It may have happened because of some glitch in updating process, also this may have been set with a query in SQL executor. Nevertheless, the script I've sent earlier turns this feature on for All employees organisational role.

Best regards,

Dennis

Dennis Hudson,

Again, this was not set by anyone on my team.  If there was a glitch in the upgrade, what else was missed?  Should we roll back our instance 7.13 and have the 7.14 upgrade reapplied?

Janine White,

Dear Janine,

We've resolved this issue in terms of support incident. As described the issue was in incorrect feature activation. We've reactivated it for your application and it resolved the issue and all users are now able to see new access rights designer. These are SQL-queries that were used while resolving the issue:

delete from AdminUnitFeatureState where id = '0A27067D-5177-401D-9D17-9586B27F9EA8'



insert into AdminUnitFeatureState(FeatureId, SysAdminUnitId, FeatureState) values ((select id from Feature

where Code = 'NewRightsManagementUI'), 'A29A3BA5-4B0D-DE11-9A51-005056C00008', 1)

Best regards,

Oscar

I appreciate the fix.  The interface is working for everyone now. However, as a Quality Engineer, I'm concerned about root cause. As I mentioned above, if the discrepancy was the result of a bad install, then there could be other issues that need to be resolved as well that we haven't realized. For example, the 7.14 upgrade also broke the main menu system.  It is no longer ordered as specified in Workplace setup, rather it only appears alphabetically, which has been reported to support.

Janine White, 

Without gathering logs and investigating the issue on the site it is hard to determine what exactly caused the issue, Please send email to support@bpmonline.com so the issue would be analyzed on your site based on your request as a support case. 

Best regards,

Dennis 

Dennis Hudson,

That's already been done and the fix applied in request #SR-0806825. The root cause provided was, "The reason of the issue was in deactivated feature called 'NewRightsManagementUI," but I'm not sure what that means other than it was a coding issue that was overlooked before publishing to production.

Show all comments

Is it possible to create an editable list on section page, just like on details or in the lookup section? For small entities dealing with a list directly might be more user friendly than using the edit page.

Like 0

Like

5 comments

Dear Carlos, 

Please see the example below, hope you find it helpful:

define("ActivitySectionV2", ["ConfigurationGrid", "ConfigurationGridGenerator", "ConfigurationGridUtilities"],
    function() {
        return {
            entitySchemaName: "Activity",
            messages: {},
            mixins: {
                ConfigurationGridUtilites: "Terrasoft.ConfigurationGridUtilities"
            },
            attributes: {
                IsEditable: {
                    dataValueType: Terrasoft.DataValueType.BOOLEAN,
                    type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
                    value: true
                }
            },
            methods: {
                edit: function() {
                    var procElId = this.getActiveRow().get("ProcessElementId");
                    var recordId = this.get("ActiveRow");
                    if (procElId && !this.Terrasoft.isEmptyGUID(procElId)) {
                        this.sandbox.publish("ProcessExecDataChanged", {
                            procElUId: procElId,
                            recordId: recordId,
                            scope: this,
                            parentMethodArguments: null,
                            parentMethod: function() {
                                return false;
                            }
                        });
                        return true;
                    }
                    this.editRecord(recordId);
                },
                editRecord: function(primaryColumnValue) {
                    this.Terrasoft.chain(
                        function(next) {
                            var activeRow = this.findActiveRow();
                            this.saveRowChanges(activeRow, next);
                        },
                        function() {
                            var activeRow = this.getActiveRow();
                            var typeColumnValue = this.getTypeColumnValue(activeRow);
                            var schemaName = this.getEditPageSchemaName(typeColumnValue);
                            this.openCardInChain({
                                id: primaryColumnValue,
                                schemaName: schemaName,
                                operation: Terrasoft.ConfigurationEnums.CardOperation.EDIT,
                                moduleId: this.getChainCardModuleSandboxId(typeColumnValue)
                            });
                        }, this);
                },
                addRecord: function(typeColumnValue) {
                    if (!typeColumnValue) {
                        if (this.get("EditPages").getCount() > 1) {
                            return false;
                        }
                        var tag = this.get("AddRecordButtonTag");
                        typeColumnValue = tag || this.Terrasoft.GUID_EMPTY;
                    }
                    this.addRow(typeColumnValue);
                },
                copyRecord: function(primaryColumnValue) {
                    this.copyRow(primaryColumnValue);
                },
                getGridRowViewModelConfig: function() {
                    var gridRowViewModelConfig =
                        this.mixins.GridUtilities.getGridRowViewModelConfig.apply(this, arguments);
                    Ext.apply(gridRowViewModelConfig, {entitySchema: this.entitySchema});
                    var editPages = this.get("EditPages");
                    this.Ext.apply(gridRowViewModelConfig.values, {HasEditPages: editPages && !editPages.isEmpty()});
                    return gridRowViewModelConfig;
                },
                getGridRowViewModelClassName: function() {
                    return this.mixins.GridUtilities.getGridRowViewModelClassName.apply(this, arguments);
                },
                onRender: function() {
                    this.callParent(arguments);
                    if (!this.get("Restored")) {
                        this.reloadGridColumnsConfig(true);
                    }
                },
                getDefaultGridColumns: function() {
                    var systemColumns = this.systemColumns;
                    var allowedDataValueTypes = this.get("AllowedDataValueTypes");
                    var entitySchema = this.entitySchema;
                    var entitySchemaColumns = [];
                    Terrasoft.each(entitySchema.columns, function(column, columnName) {
                        if (Ext.Array.contains(systemColumns, columnName) ||
                            !Ext.Array.contains(allowedDataValueTypes, column.dataValueType)) {
                            return;
                        }
                        entitySchemaColumns.push(column);
                    }, this);
                    var primaryDisplayColumnName = entitySchema.primaryDisplayColumnName;
                    entitySchemaColumns.sort(function(a, b) {
                        if (a.name === primaryDisplayColumnName) {
                            return -1;
                        }
                        if (b.name === primaryDisplayColumnName) {
                            return 1;
                        }
                        return 0;
                    }, this);
                    return (entitySchemaColumns.length > 4) ? entitySchemaColumns.slice(0, 4) : entitySchemaColumns;
                },
                onActiveRowAction: function() {
                    this.mixins.ConfigurationGridUtilities.onActiveRowAction.apply(this, arguments);
                    this.callParent(arguments);
                },
                onActiveRowAction: function(buttonTag, primaryColumnValue) {
                    switch (buttonTag) {
                        case "card":
                            this.edit();
                            break;
                        case "copy":
                            this.copyRecord(primaryColumnValue);
                            break;
                        case "remove":
                            this.deleteRecords();
                            break;
                        case "cancel":
                            this.discardChanges(primaryColumnValue);
                            break;
                        case "save":
                            this.onActiveRowSave(primaryColumnValue);
                            break;
                    }
                }
            },
            diff: /**SCHEMA_DIFF*/[
                {
                    "operation": "merge",
                    "name": "DataGrid",
                    "values": {
                        "className": "Terrasoft.ConfigurationGrid",
                        "generator": "ConfigurationGridGenerator.generatePartial",
                        "generateControlsConfig": {"bindTo": "generatActiveRowControlsConfig"},
                        "changeRow": {"bindTo": "changeRow"},
                        "unSelectRow": {"bindTo": "unSelectRow"},
                        "onGridClick": {"bindTo": "onGridClick"},
                        "initActiveRowKeyMap": {"bindTo": "initActiveRowKeyMap"},
                        "activeRowAction": {"bindTo": "onActiveRowAction"},
                        "multiSelect": {"bindTo": "MultiSelect"}
                    }
                },
                {
                    "operation": "insert",
                    "name": "activeRowActionSave",
                    "parentName": "DataGrid",
                    "propertyName": "activeRowActions",
                    "values": {
                        "className": "Terrasoft.Button",
                        "style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
                        "tag": "save",
                        "markerValue": "save",
                        "imageConfig": {"bindTo": "Resources.Images.SaveIcon"}
                    }
                },/*
                {
                    "operation": "insert",
                    "name": "activeRowActionCopy",
                    "parentName": "DataGrid",
                    "propertyName": "activeRowActions",
                    "values": {
                        "className": "Terrasoft.Button",
                        "style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
                        "tag": "copy",
                        "markerValue": "copy",
                        "imageConfig": {"bindTo": "Resources.Images.CopyIcon"}
                    }
                },*/
                {
                    "operation": "insert",
                    "name": "activeRowActionCard",
                    "parentName": "DataGrid",
                    "propertyName": "activeRowActions",
                    "values": {
                        "className": "Terrasoft.Button",
                        "style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
                        "tag": "card",
                        "markerValue": "card",
                        "visible": {"bindTo": "HasEditPages"},
                        "imageConfig": {"bindTo": "Resources.Images.CardIcon"}
                    }
                },
                {
                    "operation": "insert",
                    "name": "activeRowActionCancel",
                    "parentName": "DataGrid",
                    "propertyName": "activeRowActions",
                    "values": {
                        "className": "Terrasoft.Button",
                        "style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
                        "tag": "cancel",
                        "markerValue": "cancel",
                        "imageConfig": {"bindTo": "Resources.Images.CancelIcon"}
                    }
                },
                {
                    "operation": "insert",
                    "name": "activeRowActionRemove",
                    "parentName": "DataGrid",
                    "propertyName": "activeRowActions",
                    "values": {
                        "className": "Terrasoft.Button",
                        "style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
                        "tag": "remove",
                        "markerValue": "remove",
                        "imageConfig": {"bindTo": "Resources.Images.RemoveIcon"}
                    }
                },
                {
                    "operation": "remove",
                    "name": "DataGridActiveRowOpenAction"
                },
                {
                    "operation": "remove",
                    "name": "DataGridActiveRowCopyAction"
                },
                {
                    "operation": "remove",
                    "name": "DataGridActiveRowDeleteAction"
                },
                {
                    "operation": "remove",
                    "name": "ProcessEntryPointGridRowButton"
                }
            ]/**SCHEMA_DIFF*/
        };
    }
);

Regards,

Anastasia

Anastasia Botezat,

Thank you

Anastasia Botezat,



Can we display a list in modal?

 

Best Regards,

Solem A,

Solem Khan Abdusalam,

 

Hard to say. There should be "ConfigurationGrid", "ConfigurationGridGenerator", "ConfigurationGridUtilities" modules added as dependencies to the module of your modal window and then the grid should be added to the modal box diff. But this approach should be tested.

 

Best regards,

Oscar 

Hi,

 

I've tested the code and it works ok, but I've noticed that if you open a page and after when you want to close it, you need to click twice on close button. Did someone faced similar behavior, or knows the reason why it happens?

 

Best regards,

Jelena

Show all comments

Does BPM'Online support SSL-MA authentication? I have a financial services application that I need to connect to BPM'Online. I am going to develop few custom configuration service endpoints on BPM'Online that are going to be consumed by the financial services app. However, there is a requirement from the customer for adding an extra layer of security to any kind of interactions between the systems through client/server signed certificates(could be X.509 certificates) and perform mutual authentication. So, can mutual authentication  be performed on BPM'Online? 

Like 0

Like

2 comments

Would really appreciate some help here...

amanthena,

I'm not sure what is the difference between "mutual authentication" and just a simple authentication to an SSL application. According to the article by the link below, it seems like there is no difference.

https://blog.cloudboost.io/implementing-mutual-ssl-authentication-fc20ab2392b3

Please find how to call a bpm'online authentication service in the article by the link below. Please read all the article from the very beginning to the very end before creating the integration. There are lot of tricks that you have to use are described there. 

https://academy.bpmonline.com/documents/technic-sdk/7-13/executing-odata-queries-using-fiddler 

Show all comments

Hi,

 

Is there a way to create an autocomplete dropdown in the user interface that keeps loading data from web service calls, based on the latest search string?

 

Thanks in advance...

Like 0

Like

8 comments

Dear Amanthena,

We do not have any ready examples, however you can achieve such task in following ways.

1. Add a dependency on the field change on client side (page schema). Retrieve the value from the field and pass it on to the web service, which in turn would send this value to the external service. Receive a response and set it to the field in order to render on UI. You can see this article on web service call from client side:

https://academy.bpmonline.com/documents/technic-sdk/7-13/how-call-configuration-services-servicehelper

2. Add a dependency on the field change on client side (page schema). Call business process from the client side. Pass a parameter to the business process, this parameter would be the entered value from the field. In the business process add a web service element, which would proceed service calls and than work with the response. You can also pass the response from the service from business process on to the page like described here:

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

https://community.bpmonline.com/questions/refresh-page-fields-after-process-runs-update-signal

Though, it is quite complicated task.

In any way, please keep in mind, that you need to watch overall system performance and leave some time between service calls. More information can be found here:

https://codeburst.io/throttling-and-debouncing-in-javascript-b01cad5c8edf

Regards,

Anastasia

Thank you for your reply, Anastasia! The reference material helped. The part where we make a service call from javascript and trap the response is clear. But could you help me figure out the javascript APIs that will help me clear, rebind and render it to a control in the UI. Would a dropdown be the best choice here? What do you suggest?

 

amanthena,

You can send a message from back end to front end.In case you are calling external service via business process, you can check the example here:

https://community.bpmonline.com/questions/refresh-page-fields-after-process-runs-update-signal

The idea is to use sandbox to send and hear message, after message received you set it to the field with this.set.

Also you can use web sockets to communicate between front end and back end. 

https://academy.bpmonline.com/documents/technic-sdk/7-13/clientmessagebridge-client-side-websocket-message-handler

The field type depends on the data you will be working with. 

Hope you find it helpful

Anastasia

The data is a list of key-value pairs, "value" is the user friendly description and "key" is the id that needs to be persisted in the database on selection. i figured a dropdown would be the best control for this purpose. Can we programatically reset the contents of the dropdown in javascript with the data that is returned from the server? Could you tell me how "this.set" needs to be used here?



Once again, thanks for all the help! Much appreciated!

amanthena,

To set value to a lookup (dropdown), you need to pass an object with at least to parameters displayValue and value :

this.set("Country", {value: "a570b005-e8bb-df11-b00f-001d60e938c6", displayValue: "Australia"});

Regards,

Anastasia

Thank you, Anastasia! That helps. I might also need to rebind the list of items available for selection in the dropdown from the data that is returned from the API, and not just the selected item. How do I do that?

amanthena,

Lets say you have a dropdown, which is a Country lookup, when user enters a country name you launch a web service call that returns some internal code for the country. You work with currently chosen country, but want to change others too. You can run an ESQ to the Country object when setting data for current one. When collection is returned from ESQ, you can modify it with values received from web service call.

Regards,

Anasatsia

Thank you, Anastasia! I will explore this further.

Show all comments