Posts

Showing posts from January, 2022

DEVELOPING MOCA COMMANDS AND COMPONENTS

Image
 Developing MOCA Commands • At a high level, developing a MOCA command involves these steps. • Create the MOCA command as a .mcmd file or .mtrg file for  triggers. • The MOCA file can be created with any text editor. • There is also a screen called Server Command Maintenance that  will allow you to create MOCA commands in the WMS GUI.  Developing MOCA Commands continued… • Local syntax and Groovy MOCA commands are contained entirely  in the .mcmd or .mtrg file. • For MOCA commands that invoke Java and C code, we must create  a .mcmd file that defines the MOCA command as invoking a Java or  C component. • Then we have to develop and compile the Java or C component. • Once the MOCA command file is complete and the associated C or  Java module is compiled, we compile the MOCA command. • Variables in MOCA • Usually start with a '@' • @ type variables are placed with argument values or values on the  context stack if passed with an equal sign. • @ type variables are replaced with nu

MOCA COMMAND OVERVIEW

Image
 MOCA Command and Component Details > A MOCA command can invoke a component written in MOCA  Local Syntax, C, or Java. > A MOCA command written in MOCA Local Syntax can also  invoke the Groovy scripting language. > MOCA Components always consist of a MOCA command file  stored in directories at various levels on the WMS server. > When a MOCA Command is invoked, the MOCA architecture  starts at the highest level of customization and then works down  to find the correct MOCA command to execute. > MOCA commands are named using a Verb/Noun combination to  describe what action or service they provide. Some examples of names used for MOCA commands in  WMS include: > allocate inventory > create order > list inventory details • Note that we have one Verb indicating the action  followed by 1 or more Nouns to show what we are acting  upon. • For custom MOCA commands, we add a 'var' or a 'usr'  to the command name to distinguish the command as  being custom,

INTRODUCTION TO MOCA

Image
 MOCA is the framework for Red Prairie products to allow  the development of component based software products > Similar in some ways to COM, CORBA, EJB and other  component architectures. > The main difference between other component architectures  and MOCA is that MOCA is not Session based and not object  oriented, although in some cases the underlying implementation  may be object oriented. > MOCA is a loosely coupled, thin-client, stateless architecture  that puts most of the work on the Server side. > Examples of a "client" in WMS could be a GUI form, a web  page, a custom report, or a RF screen on a RF scanning device. > The client does not have to know the implementation details, it  simply needs to set the correct parameters to call the MOCA  command and how to handle the results and return code that  are returned. > The MOCA component is called by sending a packet of data to  the MOCA server that consists of the command and the  parameters. > T