Related links
Sales & Asset management
Sales related services
Description of a part of the AM module - sales partFI - Finance Management
Framework Core functionality
- AyMINE Framework Server
- frmFrm – provided functionality
- System Rights
- System messaging
- AyMINE Business – Price calculation
- Strings and translations
- Export collection of objects
- AyMINE Framework management FAQ
- The AyMINE licence model
- AyMINE On-premise
- System events
- Mutli-client architecture
- Import collection of objects
- User sessions
- Default server methods
- Client-defined object attributes
- Common Libraries
Module - support for management
Libraries & Lincences
Mobile & Web Application
- Runtime debugging
- System console
- AyMINE Application
- In-line table edit support
- Object scripting API – object lang
- Application object structure
- Multilingual support
- View of a single object – detail
- Is using EVAL / feval method risky?
- Included library – String operations
- Cliplink
- Object API – object <g>
- API – Data object
- Object scripting API – object User
- Object view definition
- Framework support for Drag & Drop
- Common libraries
- Multiple-object update implementation
- fClip & fCliplist
- Offline persistent objects
- Mobile application
HR - Human Resources
System Management (part of framework)
Task, Project, Quality
Task & Task pattern
CMS - Content Management & Web API services
Commands script.<command>
Commands for orchestration command processing
- Command script.stop(status=,message=)
- Command script.skip(step=)
- Command list.clearStack
- Command list.copyAttr(group=)
- Assign attribute script.set(name=,value=,group=)
Script commands are used in the orchestration string to manage the script flow. AyMINE Application evaluates them internally.
Not found what you are looking for? Check the run… commands because it could be there
Command script.stop(status=,message=)
Command stops further script processing. If it has defined attributes, it returns defined return message.
"= attr.selectNothing ? 'list.stop' : false "
Command stops the script processing if attribute selectNothing is defined. However, it is much better to show some message about the stop:
"= attr.selectNothing ? 'list.stop(status=Cancel,message=mStopReason)' : false "
The constant mStopReason
should have translation in the translations for object that called the operation.
Let's note that selectNothing is true when select list allows close without selection. If that is no allowed and user close the window, script processing is closed immediately.
Command script.skip(step=)
Command skips next commands. If value step is not defined next single step is skipped
Example
"= attr.selectNothing ? 'foo' : 'script.skip'",
"script.stop",
"baa"
Example is the simplest possible construct if else:
- if attr.selectNothing is defined start operation
foo
and stop the execution (defined in the second line) - else skips the next line and continue to the
baa
command
Usage
Definitely as mentioned in the example – command simplifies decisions in the script
Notes
-
script.skip(step=)
make effectively nothing and the processing continues to the next script line. Using simplyfalse
makes more sense – it would be faster and readable. -
step < 0
is not allowed and fails with error. Script cycling is not supported. (If somebody comes with some usable reason for cycles, it could be changed.)
Command list.clearStack
Command deletes all attributes that are passed in the script execution from command to command. Next command is processed without any attributes. Object is not cleared so that obj... fields are still available.
Command list.copyAttr(group=)
Command copy group of attributes from the previous command processing to the next one.
By default new commands in the script do not add new attributes to the processing list but this operation can change it and allows its usage for next command processing.
Usage
Usable only in case that command calls module-specific method in the linked module that returns attributes. This method allows their further usage, e.g. send to the server in the command
Assign attribute script.set(name=,value=,group=)
Script might need to set value to the attributes.
"script.set(name=linkedObjects,value=attr.selectedObjName)"
Script set value to the script attribute.
Script is equal with the command:
"={attr._a.addVal('linkedObjects', attr.selectedObjName)}"
Method attributes
- name name of the new attribute to set; required
- value value to set; required
- group group of the new attribute; optional, when no defined fceParam is the default used value
Usage
Ordinary situation occurs, when there are more selections during the script execution (including selection before the script starts) and script should send to the server information about all selections. Since the select list setup always the same attribute selectedObjName script should store its value to some other attribute before it is rewritten by the next selection.
1: "script.set(name='objID',value='obj.objID',group='linkID')",
2: "script.set(name=forObjID,value=obj.next_object_ID)",
3: "server.obj.checkFoo",
4: "=attr.checkFoo ? 'script.skip' : 'window.confirm(question=make_function)' ",
5: "select.object2.list(purpose=selectOne,location=modal,selectNothing=nothingButton)",
In the example:
- Line creates attribute objID that is passed to the all called functions. (Server function at the line 3 as well as other method called by the script can use it.
- Line saves important values necessary for further processing
- Line calls server function to get information used in the next line; server function returns attribute checkFoo (it is not visible in the script, author should know what the server function does)
-
Line makes decision according to the information from server. When server return
true / 1
, the 5th line is overskipped (script.skip
) and when it is true, user is requested to confirm operation. If user do not confirm, script is canceled -
Line User is requested to select single value (
selectNothing=nothingButton
) says that he can also complete without selection