Avoid api.boundCall

Background

api.boundCall() is a super powerful function, however, try to avoid it as much as you can. Configuration full of bound calls is a bad practice for the following reasons:

  • It makes the code more complex and there is a high risk for the project – you never know if the bound call you design will work in future releases.
  • It runs in a different thread, so there may be clashes.

Bound partition must always be set up against some technical account created specifically for the bound call purpose. Never use personal accounts, since these will get removed when a person leaves the company or by the customer during regular security audit checks. The customer is the authority to maintain accounts and therefore should provide an email address for that account since pricefx.eu/com address gets automatically deactivated.

Future Vision

The long term vision is to deprecate api.boundCall() and replace it with Groovy API. Please log a Jira ticket for the function you miss and implement using api.boundCall and assign it boundCallDeprecate tag.

Product epic:  PM-2161 - Getting issue details... STATUS

Customer Innovation Jira ticket:  PFCINNV-50 - Getting issue details... STATUS

Bees Knees release plan: /wiki/spaces/product/pages/4077715493

api.backendCall()

In dashboards there is a similar functionality which can execute the REST call from a button in a portlet without the need to configure the bound partition.

def payload = api.jsonEncode([
            "data"     : ...,
])
def ctrl = api.newController()
ctrl.addBackendCall(", "add/X", payload, "Record was created sucessfully", "Could not create record")
return ctrl
The drawback of this solution is that the REST call is not done during the logic run, but when the user clicks the button. On the other hand, the benefit is that you do not have to configure the bound partition, which is often "localhost".

Tickets

Completed Requests

Mass addOrUpdate (Hurricane 9.0)  PFUN-14440 - Getting issue details... STATUS

Mass delete (Hurricane 9.0)  PFUN-14477 - Getting issue details... STATUS

Mass add (Hurricane 9.x - TBD)  PFUN-14719 - Getting issue details... STATUS

Mass update (Hurricane 9.x - TBD)  PFUN-14476 - Getting issue details... STATUS

Open Requests

Tickets below are in order of priority. Please comment on this article with priority change requests or additions.

Make massAddOrUpdate, massEdit and massDelete:  PM-877 - Getting issue details... STATUS

PGI recalculation trigger improvements:  PM-2040 - Getting issue details... STATUS

Data retrieval - users, DCR, data from other partitions:  PM-2037 - Getting issue details... STATUS

Automated creation of PLs and LPGs:  PM-304 - Getting issue details... STATUS

Convert quote to deal:  PM-2039 - Getting issue details... STATUS

CLIC module mass updates:  PM-908 - Getting issue details... STATUS

Question

For what reason did you need to use api.boundCall? Please state your answers in the comments below this article.

Found an issue in documentation? Write to us.

Â