The interaction with the stacker server will occur through the recording and reading of the contents of the Oracle table in the table sarmat.command with fields:
- ID: NUMBER - the unique identifier of the command, is assigned automatically by server
- RP_SRC_ID: NUMBER - the ID of the source warehouse. If there is only one warehouse in the system, you can leave it empty.
- CELL_SRC_SNAME: VARCHAR2(30) - the name of the source cell
- RP_DEST_ID: NUMBER - the ID of the destination warehouse. If there is only one warehouse in the system, you can leave it empty.
- CELL_DEST_SNAME: VARCHAR2(30) - the name of the destination cell
- PRIORITY: NUMBER - the priority of the command, the greater the more important
- STATE: NUMBER - command state - set by server: =1-to start (default), =2-error, =3-started, =5-executed OK
- ERROR_CODE_ID: NUMBER - error code (if error)
- DATE_TIME_BEGIN: DATE - start time of the command by robots
- DATE_TIME_END: DATE - time for completion of the command by robots
To give command You need to add record to the table sarmat.command. For example:
insert into sarmat.command (cell_src_sname, cell_dest_sname, priority) values ('030N002','015U004',12) returning id into :AID;
insert into sarmat.command (cell_src_sname, cell_dest_sname, priority) values ('017U004','035N004',1) returning id into :AID;
In these commands ":AID" is local variable.
To monitor command state You need execute "select" SQL statement like this:
select state from sarmat.command where id=:AID;