cancel
Showing results for 
Search instead for 
Did you mean: 
Rob_Herman
Star Contributor
Star Contributor

In this section of the Unity API Blog, I hope to show you when you don’t have to use the Unity API in Workflow.

Does this sound counterintuitive? One of Hyland’s core values is to deliver configurable solutions that are intuitive to use. So we develop the Unity API to solve problems that can’t be solved any other way, but we would prefer to deliver configurable solutions to the most common of those problems. Using native OnBase functionality rather than a script makes the system easier to administer and maintain, and allows you to understand your system without relying on a programmer to understand a script. In this article, I’ll discuss how Workflow enhancements let you perform tasks that might have once required a script with native Workflow features.

Expressions

One common use of scripts is to perform calculations. In OnBase 13, we introduced the concept of Workflow Expressions, which provide a function-rich mini language to perform simple calculations and string manipulations without needing a script. (These expressions are inspired by spreadsheet functions, to give you an idea of their breadth and scope.)

Since the introduction of Expressions, the Workflow team has added more features and functions with each release. So if you are considering writing a Unity Script in Workflow whose primary purpose is to perform computations, string manipulations, or data massaging, check the documentation for Expressions and see if those might fit the bill instead.

Properties

Another scenario that used to require scripting was maintaining state information outside of the context of a single session or task execution. Scripts could be used to persist this state to an external system. OnBase 16 introduces the Persistent Property Bag, a property bag which stores properties to the database for the entire duration of a work item’s existence in a lifecycle. In addition to storing information that might otherwise have require scripting, this is useful for keeping track of routing metadata that might otherwise have to live in a keyword.

Rules and Actions

Many Unity API functions have Workflow Action and Rule equivalents. Tying the last two sections together, you can use the Set Property to Expression Action to use logic or calculation to set a Workflow property for later storage or comparison. Many Workview, Document, and Keyword API methods can be performed using Workflow instead. Another common use of scripting is to call out to an external system. In many cases, the Call WCF Service, Call Web Service, and Send Web Request Actions can be used to call out instead.

Conclusion

The Unity API is a powerful tool but in many cases Workflow can be equally powerful and can even be easier to manage or provide new options. And as Workflow Actions are added what may have not been possible yesterday may be possible today.  If your Workflow solution involves a lot of Unity scripts then Workflow Actions may be worth a second look!

Join us next week when we look Security Best Practices with the Unity API!