I created a Business Process and when calling the service externally by Postman for example I can not receive the returned data. I need to return customer data. I am using the object "Read Data".

File attachments
Like 0

Like

1 comments

Hello, 

Regarding to the read data part, we would recommend you to use script task as in example on the academy. 

https://academy.bpmonline.com/documents/technic-sdk/7-13/how-run-bpmonline-processes-web-service



The call of the process with script task returns nothing as you haven't specified return parameter, that is why it returns 1 stating that the process was called. Please try calling the process with the link http[s]://<bpm'online_application_address>/0/ServiceModel/ProcessEngineService.svc/UsrGetCustomer/Execute?ResultParameterName=ParameterReturn

Best regards,

Dennis 

Show all comments

I created a Business Process and when calling the service externally by Postman for example I can not receive the returned data. I need to return customer data.

 

 

 

File attachments
Like 0

Like

3 comments

Dear Marcelo,



In this case, we recommend using “ScriptTask” instead of the “ReadData” element. Also, please note that we recommend calling the service via C#.

For more detailed assistance, please contact technical support.



Best regards,

Norton

Norton Lingard,

 

I tried with Script Task but still the service returns null

Best Regars,

Marcelo

Dear Marcelo,



After a further investigation, we have found out that since version 7.13 this service is no longer able to return the parameter value. It was possible only in compiled processes, however, since version 7.13 all processes are interpreted. As a workaround, you can integrate with bpm and do all the needed logic with the integration instead of business process. Please find more information by the link below:



https://academy.bpmonline.com/documents/technic-sdk/7-13/integration-bp…



Best regards,

Norton

Show all comments

Hi Community,

How we can add functional roles to Portal Users?

Thanks

 

Like 0

Like

1 comments

Hi Fulgen,

You can fallow the below link for creating the portal users 

https://academy.bpmonline.com/documents/portal/7-14/add-portal-users#XREF_48563

If you observed in below screenshot there is an option called function roles you can add there.

Regards,

praveen

Show all comments

Hi all,

Is it possible to track the login and logout time of users on mobile in both offline and online modes?

Thanks.

Like 0

Like

3 comments

Dear Amanthena,

There are no basic tools in the mobile app to track the users activity. However, you can create the dashboards which would allow you to track this in both modes. Here are  the examples of the dashboards I've created http://prntscr.com/p13e4s

Best regards,

Dean

Dean Parrett,

Thanks so much for your response! We need these dashboards primarily on the web and not on mobile. However, we would need to track the sessions and history of sessions per user on the mobile too. I gather from your response that this is possible by building a custom dashboard on the web. Is that correct? I have a follow-up question. Just curious as to how these sessions are tracked for users who are offline on the mobile. Does the mobile locally record the session in offline mode and send the details to the server during the synchronization process?

Dear Amanthena,

That is correct. You need to build the new dashboard using browser version of the application and then you will be able to see it in the mobile application. As for tracking sessions in offline mode - unfortunately the application doesn't support this function. It can only be achieved with the help of complex development process. The idea might be in creating some table that would record the users' activity offline and then send the data into SysUserSession table once the mobile app is online. Unfortunately, we do not have any examples of similar implementations. 

Best regards,

Dean

Show all comments

Hi Community,

Any idea how we can show user profile in mobile just like what you have in web version.

 

 

Like 0

Like

0 comments
Show all comments

Hi, 

Is is possible to have quick filters for detail similar to the Owner and Date filters on the Activity Section? If so, is there any academy article on that? 

Thank you, 

Hatim

Like 0

Like

3 comments

Dear Hatim,

Your detail object needs to have the Owner or Date columns to be able to display them in the filter. Here is the example.

Lets add the owner lookup field based on the contacts to the Noteworthy Events detail. As the result, you can get apply the filter to the detail http://prntscr.com/ozg26u and select the owner  http://prntscr.com/ozg2bf

You can also set up the columns of the detail http://prntscr.com/ozg2jf http://prntscr.com/ozg2oh and display the  owner http://prntscr.com/ozg2uc&nbsp;

Best regards,

Dean

Dean Parrett,

Thank you for your response. 

We do have owner and date fields in the date to filter on, however we want these filters available as quick filters (just like Owner and Date Quick filters in Activity Section). These quick filters should automatically appear next to the Detail as soon as the Page with this Detail is rendered. 

Intended Quick filter on the Detail is shown below

Dear Hatim,

Here is the example of how to add these filters to a section

https://academy.bpmonline.com/documents/technic-sdk/7-13/adding-quick-filter-block-section

You can analyse it and implement for the detail.

Best regards,

Dean

Show all comments

I would like to have an option to specify that an attachment detail is read only in the properties. For example, I use multiple attachments sections for answering questions where one is reference information that should not be changed by the person answering the question and the other is for adding attachments in response to the question. This feature would significantly simplify using attachments. We have several sections that would use this functionality.

1 comments

Dear Janine,

You can set up the access permissions for the detail attachment object. The user will be able download the file, but not able to upload the edited one. Here is the example with the account attachment detail http://prntscr.com/oywufb

Once the user tries to upload the new edited file, the system will display the error message. 

Best regards,

Dean

Show all comments

Hi Community,

In mobile application Conditional columns is not working in rule type requirement. Below is my code.

Terrasoft.sdk.Model.addBusinessRule("Case", {

    ruleType: Terrasoft.RuleTypes.Requirement,

    requireType : Terrasoft.RequirementTypes.Simple,

    events: [Terrasoft.BusinessRuleEvents.Save],

    triggeredByColumns: ["UsrIsClosed"],

    conditionalColumns: [

        {name: "UsrIsClosed", value: true}

    ],

    dependentColumnNames: ["UsrComments"]

});

I want column UsrComments to be required if column UsrIsClosed is true. The code above is not working, please suggest

 

Like 0

Like

7 comments

Eugene Podkovka,

Hi Eugene, Thanks for your reply

Module appears on the client end, manifest is also correct.

Using below code without conditionalColumns rule is working fine:

Terrasoft.sdk.Model.addBusinessRule("Case", {

    ruleType: Terrasoft.RuleTypes.Requirement,

    requireType : Terrasoft.RequirementTypes.Simple,

    events: [Terrasoft.BusinessRuleEvents.Save],

    triggeredByColumns: ["UsrComments"],

    columnNames: ["UsrComments"]

});

But the above code will not serve our purpose, we only require "UsrComments" to be mandatory if "UsrIsClosed" field is true.

That's why I created below code:

Terrasoft.sdk.Model.addBusinessRule("Case", {

    ruleType: Terrasoft.RuleTypes.Requirement,

    requireType : Terrasoft.RequirementTypes.Simple,

    events: [Terrasoft.BusinessRuleEvents.Save],

    triggeredByColumns: ["UsrIsClosed"],

    conditionalColumns: [

        {name: "UsrIsClosed", value: true}

    ],

    dependentColumnNames: ["UsrComments"]

});

Please suggest, how I can use "conditionalColumns" attribute for rule type requirement.

Fulgen Ninofranco,

The code seems like correct. Try to restart the application pool and synchronize the mobile application again. 

http://prntscr.com/oyo0vz

Eugene Podkovka,

Thanks Eugene.

We already did the restart and synchronize but still not working. I also noticed one thing in the documentation. "conditionalColumns" is not discussed here as part of the attributes of rule type requirements but from other rule type it is included. Please suggest how we can achieve our condition if "conditionalColumns" will not work.  

https://academy.bpmonline.com/documents/technic-sdkmob/7-12/business-rules-mobile-application

Eugene Podkovka,

Hi Eugene, any update on this. Thank you

Fulgen Ninofranco,

Try to debug the mobile application, find how business rules work and find how to adjust them according to your needs.

https://academy.bpmonline.com/documents/technic-sdkmob/7-12/mobile-application-debugging

Start from the executeApplicableRules method in the BusinessRulesManager module.

Hi, did you find a resolution to your issue? I am facing the same thing.

Show all comments

I am running this code as a script task in a business process.

string POid = Get<string>("PurchaseOrderID");
var arParts = POid.Split('_');
 
 
		int i = Convert.ToInt32(arParts[1]);
		int newid = i + 1;
		string prefix = string.Empty;
		if(newid<10){
			prefix="00000";
		}
		else if (newid<100)
		{ prefix="0000";
		}
		else if (newid<1000)
		{
			prefix="000";
		}
		else if (newid<10000)
		{
			prefix="00";
		}
		else if (newid<100000)
		{
			prefix="0";
		}
 
		string intstringid = newid.ToString();
		string name = prefix + intstringid; 
		string newPOid = "PO_" + name;
		Set("NewPurchaseOrderID", newPOid);
return true;

I have "PurchaseOrderID" and "NewPurchaseOrderID" as the parameters that I've defined for this business process. They are spelled as in the code, I've checked that.

 

When I try to run this process, I get the error: Object reference not set to an instance of an object.

 

Can't seem to find which object I have not initiated.

 

Any help would be appreciated.

 

Thanks.

-AK

Like 0

Like

1 comments

It seems that  "PurchaseOrderID"  parameter has no value, so in the following row

var arParts = POid.Split('_')

the error "Object reference not set to an instance of an object" occurs because POid is null. To know for sure please debug the code. The article by the link below will be helpful in that: https://academy.bpmonline.com/documents/technic-sdk/7-13/server-code-debugging

Show all comments

Hi Community,

Any Idea how can I achieve below scenario in Mobile Application.

If case status is "closed", when saving record i need to show pop up message if there is no attachment. 

 

Like 0

Like

7 comments

Dear Fulgen,

You can achieve such task using push notifications for mobile application. Such push notifications are created via business process and corresponding  “Send push notifications” element.

By status change signal on the Case object you read the quantity on attachments on the record, which triggered process and based on the result you show push notification.

Check the following article on step-by-step implementation:

https://academy.bpmonline.com/documents/technic-bpms/7-14/how-set-push-notifications-mobile-application-users

Regards,

Anastasia

Anastasia Botezat,

Hi Anastasia, Thanks for your reply

Currently in mobile, we enable the status field in case form. So user can select the status to closed. Now when saving case record on mobile and if status is 'Closed', I need to do some validation if there is attachment in 'CaseFile'. This logic is achievable in web using esq to check if there are records in 'CaseFile' and use 'asyncValidate' method for validation. Now in mobile how can i implement the same logic? 

 

Fulgen Ninofranco,

Please check the following example. There is a query to Contact section, where we select Name, Id, Account. This is the corresponding to ESQ mobile version.

var store = Ext.create('Terrasoft.store.BaseStore', {
    model: 'Contact'
});
var queryConfig = Ext.create('Terrasoft.QueryConfig', {
    columns: ['Name', 'Id', 'Account'],
    modelName: 'Contact'
});
store.loadPage(1, {
    queryConfig: queryConfig,
    filters: Ext.create('Terrasoft.Filter', {
        property: 'Name',
        value: 'test'
    }),
    callback: function(records, operation, success) {
        var loadedRecord = records[0];
        if (loadedRecord) {
            var contact = loadedRecord.get('Account');                                                                                                    
            if (contact) {                                                                                                                   
                ...
            }
        }
    },
    scope: this
});

Regards,

Anastasia

Anastasia Botezat,

Hi Anastasia, Thanks for your reply

From which OOB Schema this source code is added?

Fulgen Ninofranco,

Also, here is an example of how to write direct query to database:

// sql requry to DB
var sqlText = "select pf.Id as ProductFolderId from ProductFolder pf " +
    "where pf.FolderTypeId = '9dc5f6e6-2a61-4de8-a059-de30f4e74f24' and " +
    "exists(select pif.Id from ProductInFolder pif where pif.FolderId = pf.Id and exists(" +
    "select p.Id from Product p where p.Id = pif.ProductId and " +
    " p.Active = 1 and p.TypeId = 'f1795fc3-36cc-4771-9222-178b339eb9f2'))";
 
// variable to which results will be stored
var records = [];
 
// executing query to DB
Terrasoft.Sql.DBExecutor.executeSql({
    sqls: [sqlText],
    success: function(data) {
        if (data.length &gt; 0) {
            var columnMap = {
                'ProductFolderId': 'Id'
            };
            var queryConfig = Ext.create('Terrasoft.QueryConfig', {
                modelName: 'ProductFolder',
                columns: ['Id']
            });
 
            var ids = data[0].rows;
            for (var i = 0, ln = ids.length; i &lt; ln; i++) {
                var sqlData = ids.item(i);
                var record = Terrasoft.SqlDataToRecordConverter.convert(sqlData, queryConfig, columnMap);
                records.push(record);
            }
        }
    }
});

You can check MobileCaseGridPageController, MobileActivityActionsUtilities schemas.

Regards,

Anastasia

Anastasia Botezat,

Hi Anastasia, Thanks for your reply

For 'asyncvalidate' method in web. What is its counterpart in mobile? I want to execute this esq on click of save button. So I need the same functionality as asyncvalidate in web.

Fulgen Ninofranco,

Unfortunately, there is no exactly same functionality for mobile application. However, you can use business rules instead. I have prepared an example of RegExp validation, hope it suits your task:

Terrasoft.sdk.Model.addBusinessRule('Contact', {
    ruleType: Terrasoft.RuleTypes.RegExp,
    regExp : /^([0-9\(\)\/\+ \-]*)$/
    triggeredByColumns: ['HomeNumber', 'BusinessNumber']
});

Regards,

Anastasia

Show all comments