事实证明,filenet 的 web 服务中没有可能的“UnlockDocument”或“CancelCheckout”操作。但是,我找到了一个巧妙的解决方法,可以让您做到这一点。
当通过客户端或通过操作的 webservicecall 在 filenet 中签出文档时:“CheckoutAction”。该文档的副本在 filenet 内部制作,与VersionSeriesId
原始文档相同,但具有Isreserved = 'true'
. 如果您在此副本上执行“DeleteAction”,您实际上是重新创建了 filenet 客户端中可用的手动“取消签出”步骤。“DeleteAction”需要一个ObjectId
并且在VersionSeriesId
. 为了通过 Web 服务调用获取此 ObjectID,您需要创建一个获取 this 的 SOAPCall ObjectID
。要取消初始结帐,应进行第二次 SOAPCall,删除在上一步中获得的文档ObjectID
,即“副本”。
执行搜索请求 SoapCall:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
<soap:Header>
<sch:Localization>
<sch:Locale>en_EN</sch:Locale>
<sch:Timezone/>
</sch:Localization>
</soap:Header>
<soap:Body>
<sch:ExecuteSearchRequest xsi:type="RepositorySearch" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sch:SearchScope xsi:type="ObjectStoreScope" objectStore="ObjectStoreXXX"/>
<sch:SearchSQL>SELECT [Id] FROM Document WHERE VersionSeries = {"enter the VersionSeriesID of the initial document without quotes"} AND IsReserved = true</sch:SearchSQL>
</sch:ExecuteSearchRequest>
</soap:Body>
</soap:Envelope>
DeleteActionRequest SoapCall:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
<soap:Header>
<sch:Localization>
<sch:Locale>en-EN</sch:Locale>
<sch:Timezone/>
</sch:Localization>
</soap:Header>
<soap:Body>
<sch:ExecuteChangesRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sch:ChangeRequest>
<sch:TargetSpecification classId="Document" objectId="{"enter the objectId of the previously obtained document without quotes"}" objectStore="ObjectStoreO7"/>
<sch:Action xsi:type="sch:DeleteAction"/>
</sch:ChangeRequest>
</sch:ExecuteChangesRequest>
</soap:Body>
</soap:Envelope>
现在为了让它在 SOA 中工作,您需要从您的 BPEL 调用 filenet 的 web 服务两次。首先是第一个操作:ExecuteSearchRequest
,它为您生成取消结帐所需的 ObjectId,然后是第二个操作ExecuteChangesRequest
,删除正确的文档,撤消初始结帐。这些操作在上面的 SOAP 示例中列出。此外,您需要使用工作凭据在传出标头中添加 WS-security 以访问 Filenet 服务。否则你将无法连接到 filenet。
这花费了我很多时间,所以我希望这对我以外的人有所帮助。享受您对文件网结帐删除的掌握吧!