How to call a Python or JavaScript function in Appian

Certified Associate Developer

Hi.

I am running into a problem in my current use case. I am using Appian to load new tasks into my Appian application environment every day. These tasks are then automatically assigned to a set of workers/appian users. 

Each task has its own set of requirements that must match with the worker's set of skills. This is a classic work assignment problem and I was able to reduce it to a Min Cost Max Flow problem, to which there are many established solutions in the form of an algorithm. There are plenty of code implementations of these algorithms in Python, JavaScript, C, etc etc.

My problem is that I am having a hard time figuring out a way to incorporate these code implementations into Appian. 

Does Appian have a way of calling/compiling/running python or JS code?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    If you have a way to host it, you could also put the python or JS on your own domain, expose it as webservice, and create a connected system to link to it.  Then you can use nodes in a PM to call the logic from Appian.

    If that sounds like a lot, it is, but there's a chance it's less than figuring out how to do the same in Appian.  I would at least investigate to see how much lift an Appian based rule that does it would be to create, because the webservice route adds a host of potential problems that will stay with you.  For instance, you'll have to occasionally deal with 403 and other error codes.

Reply
  • 0
    Certified Lead Developer

    If you have a way to host it, you could also put the python or JS on your own domain, expose it as webservice, and create a connected system to link to it.  Then you can use nodes in a PM to call the logic from Appian.

    If that sounds like a lot, it is, but there's a chance it's less than figuring out how to do the same in Appian.  I would at least investigate to see how much lift an Appian based rule that does it would be to create, because the webservice route adds a host of potential problems that will stay with you.  For instance, you'll have to occasionally deal with 403 and other error codes.

Children
No Data