protected DocumentReference createDocument ( String docType , Object document , String ownerType , Long ownerId , Long processInstanceId , String searchKey1 , String searchKey2 ) throws EventHandlerException { ListenerHelper helper = new ListenerHelper ( ) ; return helper . createDocument ( docType , document , getPackage ( ) , ownerType , ownerId ) ; }
This method is used to create a document from external messages . The document reference returned can be sent as parameters to start or inform processes .