Class BranchingAction
-
- All Implemented Interfaces:
-
com.embabel.agent.core.Action,com.embabel.agent.core.ActionRunner,com.embabel.agent.core.AgentSystemStep,com.embabel.agent.core.DataDictionary,com.embabel.agent.core.DataFlowStep,com.embabel.agent.core.Operation,com.embabel.agent.core.ToolGroupConsumer,com.embabel.common.core.types.Described,com.embabel.common.core.types.HasInfoString,com.embabel.common.core.types.Named,com.embabel.common.core.types.NamedAndDescribed,com.embabel.plan.Action,com.embabel.plan.Step,com.embabel.plan.goap.GoapAction,com.embabel.plan.goap.GoapStep
public class BranchingAction<I extends Object, O1 extends Object, O2 extends Object> extends AbstractAction
Action that declares one of two types of output. The code block must return a Branch object, which will be used to determine which output to use.
-
-
Field Summary
Fields Modifier and Type Field Description private final Collection<DomainType>domainTypesprivate final Map<String, ConditionDetermination>preconditionsprivate final Map<String, ConditionDetermination>effectsprivate final Stringnameprivate final Stringdescriptionprivate final List<String>preprivate final List<String>postprivate final Doublecostprivate final Doublevalueprivate final Set<IoBinding>inputsprivate final Set<IoBinding>outputsprivate final Set<ToolGroupRequirement>toolGroupsprivate final BooleancanRerunprivate final ActionQosqosprivate final Set<String>knownConditionsprivate final Collection<DynamicType>dynamicTypesprivate final Collection<JvmType>jvmTypes
-
Constructor Summary
Constructors Constructor Description BranchingAction(String name, String description, List<String> pre, List<String> post, Double cost, Double value, Boolean canRerun, ActionQos qos, Class<I> inputClass, Class<O1> leftOutputClass, Class<O2> rightOutputClass, String inputVarName, String outputVarName, Set<String> referencedInputProperties, Set<ToolGroupRequirement> toolGroups, Transformation<I, Branch<O1, O2>> block)
-
Method Summary
Modifier and Type Method Description Collection<DomainType>getDomainTypes()ActionStatusexecute(ProcessContext processContext)Execute an action Set<String>referencedInputProperties(String variable)Properties referenced from input variable Say "person" is passed. StringtoString()-
Methods inherited from class com.embabel.agent.core.support.AbstractAction
getCanRerun, getCost, getDescription, getEffects, getInputs, getName, getOutputs, getPost, getPre, getPreconditions, getQos, getToolGroups, getValue -
Methods inherited from class com.embabel.plan.goap.GoapStep
getKnownConditions, isAchievable -
Methods inherited from class com.embabel.agent.core.DataDictionary
allowedRelationships, domainTypeForLabels, getDynamicTypes, getJvmTypes -
Methods inherited from class com.embabel.agent.core.Action
infoString, shortName -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BranchingAction
BranchingAction(String name, String description, List<String> pre, List<String> post, Double cost, Double value, Boolean canRerun, ActionQos qos, Class<I> inputClass, Class<O1> leftOutputClass, Class<O2> rightOutputClass, String inputVarName, String outputVarName, Set<String> referencedInputProperties, Set<ToolGroupRequirement> toolGroups, Transformation<I, Branch<O1, O2>> block)
-
-
Method Detail
-
getDomainTypes
Collection<DomainType> getDomainTypes()
-
execute
ActionStatus execute(ProcessContext processContext)
Execute an action
- Parameters:
processContext- process moment
-
referencedInputProperties
Set<String> referencedInputProperties(String variable)
Properties referenced from input variable Say "person" is passed. Return "name" and other references
-
-
-
-