Decision making in Data Templates

hi,
Is there any option in BI Publisher using Data templates to take decision on an input parameter? Say, according to an input parameter, we want to alter the DataSourceRef of a <dataQuery> element. Any suggestion will be highly appreciated. Thanks.

Thanks for the reply.
Im using your information as follows:
{$ if ${region(receiverId)}='RNSGEXP' $}
<sqlstatement name="Q1" dataSourceRef="L1">
select.... <!-- any query -->
</sqlstatement>
{$else $}
<sqlstatement name="Q1" dataSourceRef="L2">
select.... <!-- any query -->
</sqlstatement>
{$endif$}
now, when I view this report, it gives me following error:
"ORA-32035: unreferenced query name defined in WITH clause"
Any Suggestions?
Thanks.

Similar Messages

  • Data Template construction AND data template validation questions:

    Hello World.
    I am new to Oracle BI and I have sucessfully used the BI Java APIs to create from start to finish a pdf report process. I use the DataProcessor, RTFProcessor, and FOProcessor classes to do this. My question is other than the most simple of Data Templates being used, how is everyone building their data templates? And I would also like to know how are developers validating the actual data template file? I have submitted a request through my MetaLink account for obtaining either a "dtd" or "xsd" file that could be used to validate a constructed data template. I have not received any real answers. I plan on using either XMLSpy or MyEclispse 6 to create my data templates, but I need a "rule book" dtd or xsd file in order to use the auto prompting feature. Making a data template "in the dark" cannot be the method of choice for all of the developers that visit this forum. I see some really fancy/detailed reports and I would like to see how people are building there data templates. Building the data template is at least half the battle when constructing a BI report.
    Thanks for your time.

    Notepad is the developer's choice for data definitions, seriously.
    I have seen and used XMLSpy and have Stylus Studio but they are really a bit of overkill for the data templates. I use Stylus Studio for some of our XML-FO format templates, but that is another story.
    Scott
    Edited by: ScottC on Oct 22, 2008 3:00 PM

  • Handling Null element in Data Template

    Hi experts ,
    I am facing an issue, include_null_Element is not working properly. Find the sample code below and please help me out with your suggestion. Since my data template file is big i pasting less amount
    Data template file:-
    <?xml version="1.0" encoding="UTF-8" ?>
    <dataTemplate name="sample" defaultPackage="sample" version="1.0">
    <properties>
    <property name="xml_tag_case" value="lower " />
    <property name="scalable_mode" value="off" />
    <property name="debug_mode" value="on" />
    <property name="db_fetch_size" value="20" />
    <property name="include_parameters" value="true"/>
    <property name="include_null_Element" value="TRUE"/>
    <property name="include_rowsettag" value="true"/>
    </properties>
    <dataStructure>
    <*group name="G_c_fnd_precision" dataType="varchar2" source="Q_currency_precision">*
    *<element name="c_fnd_precision" dataType="number" value="C_FND_PRECISION"/>*
    *<element name="c_fnd_currency_code" dataType="varchar2" value="C_FND_CURRENCY_CODE"/>*
    *<group name="G_one_requestor_name" dataType="varchar2" source="Q_one_requestor">*
    *<element name="one_requestor_name" dataType="varchar2" value="ONE_REQUESTOR_NAME"/>*
    *</group>*
    *<group name="G_cancel_release_date" dataType="varchar2" source="Q_cancel_release">*
    *<element name="cancel_release_date" dataType="date" value="CANCEL_RELEASE_DATE"/>*
    </group>
    </group>
    </dataStructure>
    </dataTemplate>
    output (GETTING):-
    <LIST_G_C_FND_PRECISION>
         <G_C_FND_PRECISION>
              <C_FND_PRECISION>2</C_FND_PRECISION>
              <C_FND_CURRENCY_CODE>USD</C_FND_CURRENCY_CODE>
              <LIST_G_ONE_REQUESTOR_NAME>
                        <G_ONE_REQUESTOR_NAME>
                        <ONE_REQUESTOR_NAME>Green, Mr. Terry</ONE_REQUESTOR_NAME>
                        </G_ONE_REQUESTOR_NAME>
              </LIST_G_ONE_REQUESTOR_NAME>
         </G_C_FND_PRECISION>
    </LIST_G_C_FND_PRECISION>
    OUTPUT (TO BE GET) :-
    <LIST_G_C_FND_PRECISION>
         <G_C_FND_PRECISION>
              <C_FND_PRECISION>2</C_FND_PRECISION>
              <C_FND_CURRENCY_CODE>USD</C_FND_CURRENCY_CODE>
              <LIST_G_ONE_REQUESTOR_NAME>
                        <G_ONE_REQUESTOR_NAME>
                        <ONE_REQUESTOR_NAME>Green, Mr. Terry</ONE_REQUESTOR_NAME>
                        </G_ONE_REQUESTOR_NAME>
              </LIST_G_ONE_REQUESTOR_NAME>
    <LIST_G_CANCEL_RELEASE_DATE>
    </LIST_G_CANCEL_RELEASE_DATE>
         </G_C_FND_PRECISION>
    </LIST_G_C_FND_PRECISION>
    Need ur suggestion where i am making mistake. Thanks in Advance
    --Santhosh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Raj,
    Already i tried by changing case for all property which i defined, but not making any sense.. :(
    Thanks in advance
    --Santhosh                                                                                                                                                                                                                                                                                                   

  • How to have decision making in UWL?

    Hi All,
    I have a customized subview which provides me the required tasks and for the same I have added two more columns for Approval and Rejection which are basically checkboxes.
    I have a Submit button as well. Based on the selection of the check boxes I have to perform some action on click of the submit button.
    Currently I am getting an error "This action is not valid for this item".And thus I am not able to achieve the requirement of decision making.
    I request you all to share your experience so that I can proceed.
    Regards
    DK

    Hello Atul,
    I have edited the XML code as follows. So, Let me know where I am having the possible error. I am really confused and its going hard.
    <?xml version="1.0" encoding="utf-8" ?>
      <!DOCTYPE UWLConfiguration PUBLIC '-//SAP//UWL1.0//EN' 'uwl_configuration.dtd' []>
    <UWLConfiguration >
    <ItemTypes>
    <ItemType name="uwl.task.webflow.TS99900016.E01CLNT100" connector="WebFlowConnector" defaultView="myApprovalRejectView" defaultAction = "Approve">
    <ItemTypeCriteria systemId="E01CLNT100" externalType="TS99900016" connector="WebFlowConnector" />
    <CustomAttributes>
       <CustomAttributeSource id="ABAP_BOR" objectIdHolder="externalObjectId" objectType="BUS2042" cacheValidity="final">
       </CustomAttributeSource>
    </CustomAttributes>
    </ItemType>
    </ItemTypes>
    <Views>
    <View name="myApprovalRejectView" selectionMode="NONE" width="100%" supportedItemTypes="uwl.task.webflow.TS99900016.E01CLNT100" columnOrder="attachmentCount, detailIcon, priority, subject, createdDate, status ,approveCol, rejectCol"
    sortby="createdDate:descend" tableDesign="STANDARD" visibleRowCount="10" headerVisible="yes" queryRange="undefined" tableNavigationFooterVisible="yes" tableNavigationType="CUSTOMNAV" actionRef="" refresh="999" dueDateSevere="0" dueDateWarning="0" emphasizedItems="new" displayOnlyDefinedAttributes="yes" dynamicCreationAllowed="yes" actionPosition="top">
    <Descriptions default="Refund Approval">
    <ShortDescriptions>
    <Description Language="en" Description="Refund Approval"/>
    </ShortDescriptions>
    </Descriptions>
    <DisplayAttributes>
    <DisplayAttribute name="approveCol" type="checkbox" width="" sortable="no" format="default" actionRef="approve" hAlign="CENTER" vAlign="TOP" maxTextWidth="0" headerVisible="yes">
    <Descriptions default="">
    <ShortDescriptions>
    <Description Language="en" Description="Approve"/>
    </ShortDescriptions>
    </Descriptions>
    </DisplayAttribute>
    <DisplayAttribute name="rejectCol" type="checkbox" width="" sortable="no" format="default" actionRef="reject" hAlign="CENTER" vAlign="TOP" maxTextWidth="0" headerVisible="yes">
    <Descriptions default="">
    <ShortDescriptions>
    <Description Language="en" Description="Reject"/>
    </ShortDescriptions>
    </Descriptions>
    </DisplayAttribute>
    <DisplayAttribute name="subject" type="user" width="" sortable="no" format="default" hAlign="LEFT" vAlign="BASELINE" maxTextWidth="0" headerVisible="yes">
    <Descriptions default="Name">
    <ShortDescriptions>
    <Description Language="en" Description="Name"/>
    </ShortDescriptions>
    </Descriptions>
    <!--
    <Menu>
    <MenuItem name="accept" actionRef="accept" referenceBundle="zapprove" />
    <MenuItem name="reject" actionRef="reject" referenceBundle="zreject" />
    </Menu>
    -->
    </DisplayAttribute>
    <DisplayAttribute name="createdDate" type="date" width="" sortable="yes" format="medium" hAlign="LEFT" vAlign="BASELINE" maxTextWidth="0" headerVisible="yes">
    <Descriptions default="Created Date">
    <ShortDescriptions>
    <Description Language="en" Description="Created Date"/>
    </ShortDescriptions>
    </Descriptions>
    </DisplayAttribute>
    </DisplayAttributes>
    <Actions>
    <Action name="refresh" reference="refresh"/>
    <Action name="removeFromNavigation" reference="removeFromNavigation"/>
    <Action name="addToNavigation" reference="addToNavigation"/>
    <Action name="submitUserDecisions" reference="submitUserDecisions"/>
    <Action name="cancelSubprocess" reference="cancelSubprocess"/>
    <!-- UserDecisionHandler-->
    <Action name="accept" groupAction="yes" userDecision="yes" handler="submitUserDecisions">
    <Properties>
    <Property name="accept" value="0"/>
    </Properties>
    <Descriptions default="accept"/>
    </Action>
    <Action name="reject" groupAction="yes" userDecision="yes" handler="submitUserDecisions">
    <Properties>
    <Property name="reject" value="4"/>
    </Properties>
    <Descriptions default="reject"/>
    </Action>
    <Action name="Cancle" groupAction="yes" userDecision="yes" handler="cancelSubprocess">
    <Properties>
    <Property name="Cancle" value="0"/>
    </Properties>
    <Descriptions default="Cancle"/>
    </Action>
    </Actions>
    </View>
    </Views>
    </UWLConfiguration>
    Regards
    DK

  • Oracle Report as data source in XMLP data template?

    I use XML Publisher 5.6.3 in EBS 11.5.10
    Is it possible to make an xml data template with an oracle report (rdf) as one of the sources of data? (I'm not saying create a Data Def with no Data Template attached... rather point the Data Template to an rdf, or it's xml output.)
    I converted RAXINV.rdf (Invoice) to a data template and layout template. I had to replicate the data template portion of the oracle report and add our own fields to the queries because we have custom fields we want on the invoice report. I didn't want to modify the original rdf.
    I am wondering if I could have avoided converting the entire data template portion of the rdf. My thought is that if I could make a data template that combines A) the xml output of the original rdf, together with B) our custom sql, I could eliminate the "rdf-to-data template" conversion step. This would have been a significant time savings, because making the converted data template actually work was no small task.
    Any and all thoughts are welcome.

    You need the source-data as XML for BIP.
    You can use
    1. RDF to generate xml.
    2. datatemplate to generate xml.
    The ultimate aim is to get xml out of it, so consider both are same.
    If you are comfortable in using RDF, then go ahead and use that.

  • HTML tags not displayed when using Data Template

    Hi All...
    I'm developing a BI Publisher report in which one of the columns is a clob data type. I'm using an xsl stylesheet to format the data present in the clob column.
    I've developed the report using data template as the data set. The problem is the clob column which has the HTML tags where not displayed properly...for example
    the tag starting with
    <
    is replaced with
    & lt;
    I did a couple of searches in this forum and in tim's blog but couldn't find a proper solution...
    http://blogs.oracle.com/xmlpublisher/2007/01/formatting_html_with_templates.html
    API and HTML Formated Content
    Re: Problem with text data elements containing escaped HTML codes
    HTML Output from CDATA
    Re: HTML formatted output
    Re: Special characters in CLOB are making report fail
    Re: Formatting of HTML tag problem
    I'm using BI Publisher standalone:Release 10.1.3.2. In one of the threads..
    Re: Special characters in CLOB are making report fail
    I came to know that data template cannot generate proper HTML tags for release 10.1.3.2. Is there any work around way to get the proper HTML tags when data template is used as a data set?
    Thanks in Advance...
    Edited by: user10280715 on Dec 9, 2008 3:13 PM

    Issue could be with the data that is selected in the other environment. It generally happens that the ALV will not give the same results as in the DEV in the other systems.
    Possible errors could be the control break statements in the loop...endloop block. validate the correctness of the control break stmts if any.

  • How to setup Datasource to use data triggers in Data Template

    hi all,
    Pls. let me know the process how to setup dataSourceRef that has to be mentioned in the data template tag for making use of various data triggers?
    I have packaged function which will create a temporary table that I am using in my main query. This whole process should happen in the beforereport trigger.
    can anyone help me in this regard.
    Thanks in advance
    Praneeth
    null

    Yes for triggers use need functions returning boolean value. These functions must reside in a package and you have to define package name as defaultPackage="package_name" in data template.

  • Need XML data template info

    We are using a xml data template that generates an output file which is also a .xml... how can I archive this output file by making changes in the data template xml.

    Edit the query in data template

  • Detailed log when data template is run through concurrent program

    Hi,
    I have registered a data template and I am using concurrent program to generate the output (By giving executable name as XDODTEXE and making short name of the concurrent program as the code of the data definition).
    When I run the concurrent program, it gives me the error
    Calling XDO Data Engine...
    [100306_024642974][][EXCEPTION] java.sql.SQLException: ORA-00900: invalid SQL statement
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:589)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1972)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2185)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2059)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2976)
    I have checked the sql query in TOAD its perfectly running. I am not able to find out where exactly the problem is in the SQL statement.
    Is there any way by which I can see detailed log (which line of SQL statement caused this exception)?
    Thanks in Advance,
    Harvinder

    The process to make an program incompatible with itself is described in MOS Doc 142944.1 (How to Make a Concurrent Program Incompatible with Itself) - you will have to bounce the concurrent managers for the setting to take effect
    HTH
    Srini

  • Getting while attaching .rtf file in data template

    Hi All,
    When i am attaching a .RTF file to a data template , i am getting the following erro :
    The referring page may have come from a previous session. Please select Close Window to proceed
    i tried by login again but same error coming every time, please help me on thsi.
    Thanks

    <?xml version = "1.0" encoding="UTF-8" ?>
    <dataTemplate name="XMLTEST" description = "testing the" Version = "1.0">
    <properties>
    <property name="xml_tag_case" value="upper" />
    <property name="include_parameters" value="true"/>
    <property name="include_null_Element" value="true"/>
    </properties>
    <parameters>
    <parameter name="P1" dataType = "CHARACTER"></parameter>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[
    SELECT CASH_RECEIPT_ID , AMOUNT , SET_OF_BOOKS_ID
    FROM AR_CASH_RECEIPTS_ALL
    WHERE STATUS = :P1
    ]]>
    </sqlStatement>
    </dataQuery>
    <datastructure>
    <group name = "G1" SOURCE = "Q1" groupFilter="">
    <element name="CASH_RECEIPT" value ="CASH_RECEIPT"/>
    <element name="AMOUNT" value="AMOUNT"/>
    <element name="SET_OF_BOOKS_ID" value="SET_OF_BOOKS_ID"/>
    </group>
    </datastructure>
    </dataTemplate>
    i have modified the date datatype. im still seeing the same output. how do i change the element to be derived value? can you help me with the syntax.
    Thanks!

  • Index: 0, Size: 0 error while creating data template in BI Publisher

    Hi
    When i am trying to create the data template for BI Publisher reporting. i am gettinhg the Index: 0, Size: 0
    error. I checked the query that i have used to create template and it is working fine. But not sure why it is not happening while creating the data template. Can anybody help me out please.

    how about pasting the content of your data template here, so that forum members can see what could be the problem.

  • How to call a PL/SQL procedure from a xml Data Template

    We have a requirement in which we need to call a pl/sql package.(dot)procedure from a Data Template of XML Publisher.
    we have registered a Data Template & a RTF Template in the XML Publisher Responsibility in the Oracle 11.5.10 instance(Front End).
    In the Data Query part of the Data Template , we have to get the data from a Custom View.
    This view needs to be populated by a PL/SQL procedure.And this procedure needs to be called from this Data Template only.
    Can anybody suggest the solution.
    Thanks,
    Sachin

    Call the procecure in the After Parameter Form trigger, which can be scripted in the Data Template.
    BTW, there is a specialized XML Publisher forum:
    BI Publisher

  • Problem with data template in XML publisher

    When I create data template in xml publisher and save it, I get next message:
    dbase:
    Failed to save data.
    Error occurred when creating xml data.
    undefined
    NaN
    NaN
    dbase is a database server
    JDBC connection name:asu_fox
    JDBC connection URL: jdbc:oracle:thin:@dbase:1521:ora03
    Text in data template:
    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="data_report_2" description="data template for reports 2 and 10"
    dataSourceRef="asu_fox" version="1.0">
    <dataQuery>
         <sqlStatement name="Q1">
              <![CDATA[select kol_pl,kol_sv,trud_pl,trud_sv,nom_per_p,kod_polu_p,p_v,kod_tmc,liter,kol_skl,nom_per,shifr_dse,shifr_izd,kod_polu,kod_post,trud,kol_m,tip_rin,kod_op,kod_op0,order1,n_val,shifr_usel_val,sum_trud_val,sum_trud_val_sv from reporter.t_plan_report_2]]>
         </sqlStatement>
    </dataQuery>
    <dataStructure>
         <group name="group_all" source="Q1">
              <element name="kol_pl_l" value="kol_pl"/>
              <element name="kol_sv_l" value="kol_sv"/>
              <element name="trud_pl_l" value="trud_pl"/>
              <element name="trud_sv_l" value="trud_sv"/>
              <element name="nom_per_p_l" value="nom_per_p"/>
              <element name="kod_polu_p_l" value="kod_polu_p"/>
              <element name="p_v_l" value="p_v"/>
              <element name="kod_tmc_l" value="kod_tmc"/>
              <element name="liter_l" value="liter"/>
              <element name="nom_per_l" value="nom_per"/>
              <element name="shifr_dse_l" value="shifr_dse"/>
              <element name="shifr_izd_l" value="shifr_izd"/>
              <element name="kod_polu_l" value="kod_polu"/>
              <element name="kod_post_l" value="kod_post"/>
              <element name="trud_l" value="trud"/>
              <element name="kol_m_l" value="kol_m"/>
              <element name="tip_rin_l" value="tip_rin"/>
              <element name="kod_op_l" value="kod_op"/>
              <element name="kod_op0_l" value="kod_op0"/>
              <element name="order1_l" value="order1"/>
              <element name="n_val_l" value="n_val"/>
              <element name="shifr_usel_val_l" value="shifr_usel_val"/>
              <element name="sum_trud_val_l" value="sum_trud_val"/>
              <element name="sum_trud_val_sv_l" value="sum_trud_val_sv"/>
         </group>
    </dataStructure>
    </dataTemplate>
    I get this error with different data templates.
    Help me, please.
    Vladimir

    Hi Vladimir
    Can you test the data template posted here. http://static7.userland.com/oracle/gems/leslieStuddard/EMPLOYEES.xml
    It needs to connect to the sample scott schema, hopefully you have it installed?
    Let me know if you get the same error.
    thanks
    Tim

  • How to handle errors in data templates

    Hi
    What is the recommended way to handle errors for example if one of your SQL statement in a data template returned no data how and where would you be able to create an error message for the user to find and read.
    Thanks,
    Mark

    The closest I have come to doing this is to put conditional statements into the format template. If a value matches an expected (ex. is null) you can return a message (in the report) via the format template (ex. "No Data Found").
    I am not sure this really answers your question as this is in the format template, but I generally view them as a matched pair that work together. I try to stick with data extraction in the data define, and do all my conditional stuff in the format templates.
    Scott

  • Issues with using Outer join in Data Template

    Hi all,
    this is my data in two tables .
    Table Ronny1
    colA colB
    1 u
    2 v
    3 x
    Table Ronny2
    colC colD
    1 q
    2 r
    This is my data template
    <dataTemplate name="MGF" dataSourceRef="Source1">
         <dataQuery>
              <sqlStatement name="Q1" dataSourceRef="Source1">
                   <![CDATA[select C, D  from Ronny2]]>
              </sqlStatement>
              <sqlStatement name="Q2" dataSourceRef="Source2">
                   <![CDATA[select A , B from lokesh1 where A = :C]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="G1" source="Q1">
                   <group name="G2" source="Q2">
                        <element name="A" value="A"/>
                        <element name="B" value="B"/>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>
    Now this would give me result as
    A B
    1 u
    2 v
    however my requirement is this
    A B
    1 u
    2 v
    3 x
    that is, i want to display all the rows of table Ronny1 and matching rows from table Ronny2. I tried modifiying my second sql as
    <![CDATA[select A , B from lokesh1 where A = :C (+)]]> ( using a outer join)
    but this does give me correct data and comes back with the cartesion product.
    Can anyone please answer this for me that how can we use the outer join in data templaes.
    Thanks
    Ronny

    hey vetsrini,
    sorry for the confusion here,
    actually i want to display all the rows from table Ronny1 and i am also pulling in the matching rows from table Ronny2 and my data structure looks as ( pulling in column D from table Ronny2)
    <dataStructure>
    <group name="G1" source="Q1">
    <group name="G2" source="Q2">
    <element name="A" value="A"/>
    <element name="B" value="B"/>
    <element name="D" value="D"/>
    </group>
    </group>
    </dataStructure>
    and this is what i want the output to be
    A B D
    1 u q
    2 v r
    3 x
    Hence the row where A <> C the data in the D column will be null, same as in the case of outer join.
    any suggestions
    Thx
    Ronny

Maybe you are looking for

  • Error while deploying a war file:Urgent

    Hi, I am trying to deploy a war file and i am getting the followinig error on the emd console. "Failed to deploy application 'xxxx'. No config data persisted for component apache, transaction ID 192.168.40.44.5789f3......" The opmn log file in the or

  • Zoom with swipe in xcode 5.0.1

    Hello, I have a problem by working in Maverick, after rapidely after some hours of use, the use of the zoom in the storyboard was not availble with the mouse. I think that the problem is related with the same bug as safari (see:https://discussions.ap

  • How to backup apps

    Background: My 3G iPhone was backed up to my MacBook Pro. My laptop was stolen. I have access to another Mac so I can make backups before I purchase a new MacBook Pro, however- Problem: I'm able to back up photos, calendar, contacts, podcasts, etc. I

  • Word 2007 on MacBook ?

    could you download Word 2007 onto a MacBook ? ???

  • Stuck on a simple hierarchy variable...

    Hey guys, On the MBS(Marine Biology Simulation) i am creating a fish which teleports but i need to ensure that the nextLocation is valid (via the isValid method) It is located in the Environment.java file and looks like this: /** Verifies whether a l