... | ... | @@ -3,18 +3,17 @@ To register an object with a new PID, it is possible to |
|
|
2. invoke it
|
|
|
|
|
|
1) To define a rule that can be invoked by an iRODS icommand called [irule](https://docs.irods.org/master/icommands/user/#irule) means to create a file similar to this (call it, for example, test_rule.r):
|
|
|
|
|
|
```
|
|
|
PID_DO_reg {
|
|
|
*iCATCache = "true";
|
|
|
EUDATCreatePID(*parent_pid, *source, *ror, *iCATCache, *newPID);
|
|
|
EUDATCreatePID(*parent_pid, *source, *ror, *fio, *fixed, *newPID);
|
|
|
writeLine("stdout","PID: *newPID");
|
|
|
}
|
|
|
INPUT *source="/My collection of registered data/datum.txt",*parent_pid="None",*ror="None"
|
|
|
INPUT *source="/My coll of registered data/datum.txt",*parent_pid="None",*ror="None",*fio="None",*fixed="true"
|
|
|
OUTPUT ruleExecOut
|
|
|
|
|
|
```
|
|
|
2) Then open a shell where the iRODS icommand are available and, after the initial authentication with [iinit](https://docs.irods.org/master/icommands/user/#iinit), type:
|
|
|
|
|
|
```
|
|
|
$ irule -F test_rule.r
|
|
|
PID: 842/cc6b7272-77c2-4bd8-a319-0fe4c91ff9dd
|
|
|
|
|
|
```
|
|
|
If the output shows the new PID just created, it works. |
|
|
\ No newline at end of file |