--
-- Workflow Service Contracts
--
-- @author Lars Pind (lars@collaboraid.biz)
-- @version $Id: workflow-service-contracts-create.sql,v 1.1.2.1 2003/03/07 12:22:58 lars Exp $
--
-- GNU GPL v2
--

--
-- The service contract for workflows
-- 

create function inline_1()
returns integer as '
DECLARE
BEGIN
   PERFORM acs_sc_contract__new (
              ''NotificationType'',
              ''Notification Type''
   );

   PERFORM acs_sc_msg_type__new (
              ''NotificationType.GetURL.InputType'',
              ''object_id:integer''
   );

   PERFORM acs_sc_msg_type__new (
              ''NotificationType.GetURL.OutputType'',
              ''url:string''
   );

   PERFORM acs_sc_operation__new (
              ''NotificationType'',
              ''GetURL'',
              ''gets the URL for an object in this notification type'',
              ''f'',
              1,
              ''NotificationType.GetURL.InputType'',
              ''NotificationType.GetURL.OutputType''
   );

   PERFORM acs_sc_msg_type__new (
              ''NotificationType.ProcessReply.InputType'',
              ''reply_id:integer''
   );

   PERFORM acs_sc_msg_type__new (
              ''NotificationType.ProcessReply.OutputType'',
              ''success_p:boolean''
   );

   PERFORM acs_sc_operation__new (
              ''NotificationType'',
              ''ProcessReply'',
              ''Process a single reply'',
              ''f'',
              1,
              ''NotificationType.ProcessReply.InputType'',
              ''NotificationType.ProcessReply.OutputType''
   );

   return (0);

END;
' language 'plpgsql';

select inline_1();
drop function inline_1();

