Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:3500:0300 [2023/04/05 05:54] – sean | docs:3500:0300 [2025/06/12 02:35] (current) – Rename to AwareIM aware_support3 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== Adding custom processes ====== | ====== Adding custom processes ====== | ||
| - | The following section describes how to write extensions implementing custom processes and plug them into //**Aware IM**//. | + | The following section describes how to write extensions implementing custom processes and plug them into //**AwareIM**//. |
| To implement custom processes and add them to the configuration of your application follow the steps below: | To implement custom processes and add them to the configuration of your application follow the steps below: | ||
| Line 11: | Line 11: | ||
| The rest of the section describes how to write the code implementing the custom process (step 1 above). | The rest of the section describes how to write the code implementing the custom process (step 1 above). | ||
| - | |||
| - | ===== Writing code for a custom process component ===== | ||
| - | |||
| - | When writing a process it is important to understand how processes fit into the architectural framework of //**Aware IM**//. When a process is started //**Aware IM**// creates the //execution context//, which contains the information about the environment in which the process is running. This information contains the data about the user who started the process, the process start-up time, the information about the current database transaction as well as many other things. The execution context is available to the process as the [[docs: | ||
| - | |||
| - | A process communicates with //**Aware IM**// through the call-back interface called [[docs: | ||
| - | |||
| - | Sometimes a particular process calls a service, which takes a long time to fulfil. In this case the call to the service may time out. If this happens the process is // | ||
| - | |||
| - | The custom process component must implement '' | ||
| - | |||
| - | The following guidelines should be used when writing a process: | ||
| - | |||
| - | * A process is not supposed to perform any operations with the database directly (such as create, open or modify database tables, manage transactions etc) – this is taken care of by the //**Aware IM**// framework. | ||
| - | * A process generally should not take long to execute as it is running within a context of a database transaction. If a process does take a long time to execute it should every now and again send a special signal to the //**Aware IM**// framework. Having received such a signal //**Aware IM**// would suspend the process, commit the current transaction and continue the process execution (resume the process). This signal can be sent if the process throws '' | ||
| - | * If a process calls a method of the [[docs: | ||
| - | { | ||
| - | engine.updateEntity (this, entity, null, null); | ||
| - | } | ||
| - | catch (ServerTimeOutException se) | ||
| - | { | ||
| - | throw new SuspendProcessException (se); | ||
| - | }</ | ||
| - | |||
| - | The methods of the '' | ||
| - | |||
| - | {{tagtopic> | ||
| {{simplenavi>: | {{simplenavi>: | ||
| - | |||