/*
   * JAX-RS Annotated methods
   */
  @GET
  @Path("{csid}" + WorkflowClient.SERVICE_PATH)
  public byte[] getWorkflow(@PathParam("csid") String csid) {
    PoxPayloadOut result = null;

    try {
      ServiceContext<PoxPayloadIn, PoxPayloadOut> parentCtx = createServiceContext();
      String parentWorkspaceName = parentCtx.getRepositoryWorkspaceName();

      MultipartServiceContext ctx =
          (MultipartServiceContext) createServiceContext(WorkflowClient.SERVICE_NAME);
      WorkflowDocumentModelHandler handler = createWorkflowDocumentHandler(ctx);
      ctx.setRespositoryWorkspaceName(
          parentWorkspaceName); // find the document in the parent's workspace
      getRepositoryClient(ctx).get(ctx, csid, handler);
      result = ctx.getOutput();
    } catch (Exception e) {
      throw bigReThrow(e, ServiceMessages.READ_FAILED + WorkflowClient.SERVICE_PAYLOAD_NAME, csid);
    }

    return result.getBytes();
  }