Platform Explorer / CMF 1.8

Operation Relations.CreateRelation (Create Relation)

In component

Description

Create a relation between 2 documents. The subject of the relation will be the input of the operation and the object of the relation will be retrieved from the context using the 'object' field. The 'predicate' field specify the relation predicate. The 'outgoing' flag indicates the direction of the relation - the default is false which means the relation will go from the input object to the object specified as 'object' parameter. Return back the subject document.
Operation id Relations.CreateRelation
Category Services
Label Create Relation
Requires
Since

Parameters

Name Description Type Required Default value
object document yes  
predicate string yes  
outgoing boolean no false 

Signature

Inputs document, documents
Outputs document, documents

Implementation Information

Implementation Class
Contributing Component

JSON Definition

{
  "id" : "Relations.CreateRelation",
  "label" : "Create Relation",
  "category" : "Services",
  "requires" : "",
  "description" : "Create a relation between 2 documents. The subject of the relation will be the input of the operation and the object of the relation will be retrieved from the context using the 'object' field. The 'predicate' field specify the relation predicate. The 'outgoing' flag indicates the direction of the relation - the default is false which means the relation will go from the input object to the object specified as 'object' parameter. Return back the subject document.",
  "url" : "Relations.CreateRelation",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "object",
    "description" : null,
    "type" : "document",
    "required" : true,
    "widget" : "",
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "predicate",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : "",
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "outgoing",
    "description" : null,
    "type" : "boolean",
    "required" : false,
    "widget" : "",
    "order" : 0,
    "values" : [ "false" ]
  } ]
}