Topic
  • 7 replies
  • Latest Post - ‏2013-10-18T07:48:50Z by nicolas.leralle
IvanSaavedra
IvanSaavedra
30 Posts

Pinned topic Import - File Type

‏2013-10-08T21:23:10Z |

Hi All!

 

Is there any way to restrict the user to import only DWG and PDF files to ICN?

 

Tks a lot!

  • nicolas.leralle
    nicolas.leralle
    102 Posts

    Re: Import - File Type

    ‏2013-10-09T09:47:29Z  

    If you're using IBM FileNet P8, you can create a synchronous subscription to handle this point, but this will be to the server side.

     

    Best regards,

     

    Nicolas

  • IvanSaavedra
    IvanSaavedra
    30 Posts

    Re: Import - File Type

    ‏2013-10-09T12:16:58Z  

    If you're using IBM FileNet P8, you can create a synchronous subscription to handle this point, but this will be to the server side.

     

    Best regards,

     

    Nicolas

    Nicolas,

    Hi!

     

    Can you show me how to create that?

     

    Tks a lot for the answer! 

     

    Best Regards,

    Ivan Saavedra

  • nicolas.leralle
    nicolas.leralle
    102 Posts

    Re: Import - File Type

    ‏2013-10-09T12:29:18Z  

    Nicolas,

    Hi!

     

    Can you show me how to create that?

     

    Tks a lot for the answer! 

     

    Best Regards,

    Ivan Saavedra

    On your "Document" class, you have to add a new synchronous subscription, wich  will rise an event action.

    This event action is a specific development. It will check that the mime type is in the wanted mime-type list. If not, you just have to throw an EngineRuntimeException, such as ExceptionCode.CONTENT_PC_UNEXPECTED_CONTENT_TYPE. The user will receive this message as the subscription is synchron, and the document won't be created.

     

    Best regards,

     

    Nicolas

  • IvanSaavedra
    IvanSaavedra
    30 Posts

    Re: Import - File Type

    ‏2013-10-14T22:25:04Z  

    On your "Document" class, you have to add a new synchronous subscription, wich  will rise an event action.

    This event action is a specific development. It will check that the mime type is in the wanted mime-type list. If not, you just have to throw an EngineRuntimeException, such as ExceptionCode.CONTENT_PC_UNEXPECTED_CONTENT_TYPE. The user will receive this message as the subscription is synchron, and the document won't be created.

     

    Best regards,

     

    Nicolas

    Nicolas,

    Hi! 

     

    I already did a workflow subscription that launch a flow denpending on wich is the document type. 

     

    But, know I have to give a warning or something like a mesage, to show the user that he/she can't import this type of document. Is there anyway to do that? Do you have any document for that? 

     

    Tks a lot! 

     

    Ivan Saavedra

  • nicolas.leralle
    nicolas.leralle
    102 Posts

    Re: Import - File Type

    ‏2013-10-15T08:31:41Z  

    Nicolas,

    Hi! 

     

    I already did a workflow subscription that launch a flow denpending on wich is the document type. 

     

    But, know I have to give a warning or something like a mesage, to show the user that he/she can't import this type of document. Is there anyway to do that? Do you have any document for that? 

     

    Tks a lot! 

     

    Ivan Saavedra

    If a syncrhonous subscription throw an EngineRuntimeException, IBM Content Navigator will display the error message to the user.

    For instance, if you throw the "E_ACCESS_DENIED" exception code, the user will have this message in ICN.

    That's the reason why I illustrate my last post with the ExceptionCode "CONTENT_PC_UNEXPECTED_CONTENT_TYPE", that could match with your need.

    Have a look on all "ExceptionCode" available to throw the wanted one.

    Try for instance on a test class, creation event, this code:

    public void onEvent(ObjectChangeEvent event, Id id) {
    throw new EngineRuntimeException(ExceptionCode.CONTENT_PC_UNEXPECTED_CONTENT_TYPE);
    }

     

    Best regards,

     

    Nicolas

  • IvanSaavedra
    IvanSaavedra
    30 Posts

    Re: Import - File Type

    ‏2013-10-17T17:33:28Z  

    If a syncrhonous subscription throw an EngineRuntimeException, IBM Content Navigator will display the error message to the user.

    For instance, if you throw the "E_ACCESS_DENIED" exception code, the user will have this message in ICN.

    That's the reason why I illustrate my last post with the ExceptionCode "CONTENT_PC_UNEXPECTED_CONTENT_TYPE", that could match with your need.

    Have a look on all "ExceptionCode" available to throw the wanted one.

    Try for instance on a test class, creation event, this code:

    public void onEvent(ObjectChangeEvent event, Id id) {
    throw new EngineRuntimeException(ExceptionCode.CONTENT_PC_UNEXPECTED_CONTENT_TYPE);
    }

     

    Best regards,

     

    Nicolas

    Nicolas,

    Hi!

     

    Tks a lot for all the information that you sent, but I tried a lot  and I really don't know what I have to do to implement that. For example, I don't know how to make a syncrhonous subscription to throw an EngineRuntimeException, and I don't know where I can implement the code that you sent.. 

    Can you recomend me what I have to study to dominate that? If you can, Do you have any link for this informations? 

     

    One more time, tks a lot Nicolas!

     

    Best Regards,

     

    Ivan Saavedra

  • nicolas.leralle
    nicolas.leralle
    102 Posts

    Re: Import - File Type

    ‏2013-10-18T07:48:50Z  

    Nicolas,

    Hi!

     

    Tks a lot for all the information that you sent, but I tried a lot  and I really don't know what I have to do to implement that. For example, I don't know how to make a syncrhonous subscription to throw an EngineRuntimeException, and I don't know where I can implement the code that you sent.. 

    Can you recomend me what I have to study to dominate that? If you can, Do you have any link for this informations? 

     

    One more time, tks a lot Nicolas!

     

    Best Regards,

     

    Ivan Saavedra

    Hi Ivan,

     

    You need to follow this development section in the infocenter, which explains all steps to implement a subscription.

     

    http://pic.dhe.ibm.com/infocenter/p8docs/v5r2m0/topic/com.ibm.p8.ce.dev.ce.doc/subscription_concepts.htm

     

    The outline is:

    1. develop your specific code module and export it on the Content Engine server
    2. Add a subscription with ACCE on the target class
    3. Create through the wizard the event action, pointing on your specific development (choose configure code module to specify the .class file to use)

     

    Best regards,

     

    Nicolas