public abstract class AbstractActivity extends java.lang.Object implements SmartServiceContext
Modifier and Type | Field and Description |
---|---|
ActivityExecutionMetadata |
_metadata |
Constructor and Description |
---|
AbstractActivity() |
Modifier and Type | Method and Description |
---|---|
SafeActivityReturnVariable[] |
execute(ActivityClassParameter[] inputs_,
SafeActivityReturnVariable[] outputs_,
java.lang.Object extraParameters_,
ServiceContext sc_)
The actual method that implements an activity.
|
SafeActivityReturnVariable[] |
execute(ActivityClassParameter[] inputs_,
SafeActivityReturnVariable[] outputs_,
java.lang.Object extraParameters_,
com.appiancorp.asl3.servicefw.connect.ServiceContext sc_)
Deprecated.
since 6.0.3; override the other
execute(ActivityClassParameter[], SafeActivityReturnVariable[], Object, ServiceContext) |
java.util.HashMap |
getActivityMap()
Retrieves the
HashMap which stores key/value pairs to be used
in a non-process environment after the activity executes. |
java.lang.Object |
getExtraParameters() |
ActivityExecutionMetadata |
getMetadata()
Returns the metadata associated with this execution, including properties related
to the Process Model and Tasks.
|
java.util.Locale |
getPrimaryLocale()
Returns the primary Locale of the Appian System.
|
ProcessModelProperties |
getProcessModelProperties() |
ProcessProperties |
getProcessProperties() |
TaskProperties |
getTaskProperties() |
User |
getUser() |
java.util.Locale |
getUserLocale()
Returns the Locale of the User executing this Smart Service.
|
java.lang.String |
getUsername()
Returns the User for whom this Smart Service is executing.
|
protected java.lang.Object |
lookupInWebAppJndi(java.lang.String name)
Deprecated.
The JNDI context "comp" should not be used. Use any context that does not begin
with "comp", and retrieve the object using the standard JNDI syntax:
Context ctx = new InitialContext();
Object o = ctx.lookup(name); |
ActivityReturnVariable[] |
perform()
This method is called by the framework when the activity is to be
executed.
|
ActivityReturnVariable[] |
perform(ServiceContext sc_)
This method is called by the framework when the activity is to be
executed.
|
java.lang.Long |
run()
Deprecated.
08-07-2006 Use perform() instead.
|
java.lang.Long |
run(ServiceContext sc_)
Deprecated.
08-07-2006 Use perform(ServiceContext) instead.
|
void |
setActivityMap(java.util.HashMap activityMap_)
Sets the
HashMap for this activity. |
void |
setActivityProperties(ActivityProperties ap_)
Convenience method to set all properties at once.
|
void |
setExtraParameters(java.lang.Object extraParameters_) |
void |
setMetadata(ActivityExecutionMetadata metadata_) |
void |
setPrimaryLocale(java.util.Locale primaryLocale_) |
void |
setProcessModelProperties(ProcessModelProperties processModelProperties_) |
void |
setProcessProperties(ProcessProperties processProperties_) |
void |
setTaskProperties(TaskProperties taskProperties_) |
void |
setUser(User user_) |
void |
setUserLocale(java.util.Locale userLocale_) |
public ActivityExecutionMetadata _metadata
public final ActivityReturnVariable[] perform() throws ActivityExecutionException, java.lang.Exception
execute()
but does not notify the
process engine of success. This method is not meant to be overridden and
is thus final.ActivityExecutionException
- This exception contains the actual exception that occurred while
executing the activity. It can also contain messages for both
user and the administrator. In the case of attended activity the
message for the user will be display immediately.java.lang.Exception
- If anything else goes wrong. Activities can throw any subclass of
Exception
. All exceptions are caught and handled
higher in the framework. If an activity fails, it is necessary
to throw an exception from this method so that the process
engine will be alerted that the activity failed.public final ActivityReturnVariable[] perform(ServiceContext sc_) throws ActivityExecutionException, java.lang.Exception
execute()
but does not notify the
process engine of success. This method is not meant to be overridden and
is thus final.sc_
- ServiceContext of the user executing the activity.ActivityExecutionException
- This exception contains the actual exception that occurred while
executing the activity. It can also contain messages for both
user and the administrator. In the case of attended activity the
message for the user will be display immediately.java.lang.Exception
- If anything else goes wrong. Activities can throw any subclass of
Exception
. All exceptions are caught and handled
higher in the framework. If an activity fails, it is necessary
to throw an exception from this method so that the process
engine will be alerted that the activity failed.@Deprecated public final java.lang.Long run() throws java.lang.Exception
execute()
and then notifies the
process engine of success, assuming the activity was successful. This
method is not meant to be overridden and is thus final.java.lang.Exception
- If anything goes wrong.@Deprecated public final java.lang.Long run(ServiceContext sc_) throws java.lang.Exception
execute()
and then notifies the
process engine of success, assuming the activity was successful. This
method is not meant to be overridden and is thus final.sc_
- ServiceContext of the user executing the activity.java.lang.Exception
- If anything goes wrong.public SafeActivityReturnVariable[] execute(ActivityClassParameter[] inputs_, SafeActivityReturnVariable[] outputs_, java.lang.Object extraParameters_, ServiceContext sc_) throws ActivityExecutionException, java.lang.Exception
inputs_
- The input parameters to the activity.outputs_
- The structure for the outputs from the activity. This object
graph should be populated and returned from this method.extraParameters_
- Any extra parameters for the activity returned to the framework
from the ActivityParameterHelper.createExtraOutputMap(com.appiancorp.suiteapi.process.ActivityClassParameter[])
sc_
- The activity will be performed under this service contextActivityExecutionException
- This exception contains the actual exception that occurred while
executing the activity. It can also contain messages for both
user and the administrator. In the case of attended activity the
message for the user will be display immediately.java.lang.Exception
- If anything else goes wrong. Activities can throw any subclass of
Exception
. All exceptions are caught and handled
higher in the framework. If an activity fails, it is necessary
to throw an exception from this method so that the process
engine will be alerted that the activity failed.@Deprecated public SafeActivityReturnVariable[] execute(ActivityClassParameter[] inputs_, SafeActivityReturnVariable[] outputs_, java.lang.Object extraParameters_, com.appiancorp.asl3.servicefw.connect.ServiceContext sc_) throws ActivityExecutionException, java.lang.Exception
execute(ActivityClassParameter[], SafeActivityReturnVariable[], Object, ServiceContext)
inputs_
- outputs_
- extraParameters_
- sc_
- ActivityExecutionException
java.lang.Exception
public ProcessModelProperties getProcessModelProperties()
getProcessModelProperties
in interface SmartServiceContext
ProcessModel
public void setProcessModelProperties(ProcessModelProperties processModelProperties_)
getProcessModelProperties()
public ProcessProperties getProcessProperties()
getProcessProperties
in interface SmartServiceContext
public void setProcessProperties(ProcessProperties processProperties_)
getProcessProperties()
public TaskProperties getTaskProperties()
getTaskProperties
in interface SmartServiceContext
public void setTaskProperties(TaskProperties taskProperties_)
getTaskProperties()
public void setActivityProperties(ActivityProperties ap_)
ap_
- the properties of the task, process, and model for this activitypublic ActivityExecutionMetadata getMetadata()
SmartServiceContext
getMetadata
in interface SmartServiceContext
public void setMetadata(ActivityExecutionMetadata metadata_)
getMetadata()
public void setExtraParameters(java.lang.Object extraParameters_)
getExtraParameters()
public java.lang.Object getExtraParameters()
public User getUser()
public java.lang.String getUsername()
SmartServiceContext
getUsername
in interface SmartServiceContext
SmartServiceContext.getUserLocale()
public java.util.HashMap getActivityMap()
HashMap
which stores key/value pairs to be used
in a non-process environment after the activity executes. When the
activity executes all key/value pairs in the HashMap
will
be copied to the request.
public void setActivityMap(java.util.HashMap activityMap_)
HashMap
for this activity.activityMap_
- getActivityMap()
public java.util.Locale getPrimaryLocale()
SmartServiceContext
getPrimaryLocale
in interface SmartServiceContext
SmartServiceContext.getUserLocale()
public void setPrimaryLocale(java.util.Locale primaryLocale_)
primaryLocale_
- The primaryLocale to set.public java.util.Locale getUserLocale()
SmartServiceContext
getUserLocale
in interface SmartServiceContext
SmartServiceContext.getUsername()
,
SmartServiceContext.getPrimaryLocale()
public void setUserLocale(java.util.Locale userLocale_)
userLocale_
- The userLocale to set.@Deprecated protected java.lang.Object lookupInWebAppJndi(java.lang.String name) throws javax.naming.NamingException
Context ctx = new InitialContext();
Object o = ctx.lookup(name);
name
- The JNDI name to lookup.
javax.naming.NamingException
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.