Step 1: Create a folder say ‘REST’ in your
project.
Step 2: Create a sub-folder say ‘/config / atg
/rest’ and again a sub-folder as ‘registry’ in your project.
Step 3: In registry folder, create a File
with “ ActorChainRestRegistry.properties
” name.
Step 4: In ActorChainRestRegistry.properties which is a out of box component contains all the OOB REST services registered by default, register all the URI’s that are customized/ added
i.e.,mention the path of properties file with the required method names
extended.
Step 5: That property file contains the path
of the actor file as “definitionFile = aaa.xml”.
Step 6: Define all your actors in
aaaActor.xml with required inputs and outputs.
Step 7: Provide the REST module in build modules of your build script
registeredUrls+=\
/atg/userprofiling/ProfileActor/addresses,\
/atg/userprofiling/ProfileActor/creditCards,\
/atg/userprofiling/LoginActor/loginWithFB,\
/atg/userprofiling/LoginActor/loginloginWithFB-success,\
/atg/userprofiling/LoginActor/loginloginWithFB-error
/atg/userprofiling/ProfileActor/addresses,\
/atg/userprofiling/ProfileActor/creditCards,\
/atg/userprofiling/LoginActor/loginWithFB,\
/atg/userprofiling/LoginActor/loginloginWithFB-success,\
/atg/userprofiling/LoginActor/loginloginWithFB-error
here LoginActor is our properties file and loginWithFB, loginloginWithFB-success, loginloginWithFB-error are the actor chains in the defined propertiesfile.
Sample LoginActor.properties
$class=atg.service.actor.ActorChainService
//similar for all files
definitionFile=/atg/userprofiling/loginActorDefinition.xml
In the loginActorDefinition.xml we will define the actor chains.
NOTE: Complete Notes regarding REST web services and actor chains and other detailed explanation will be provided in next posts
1 comments:
is it mandatory to add all actor chains in the actor chain registry?
Post a Comment